wepy-com-paper-flash

A nifty flash message component for use in wepyjs, a Vue-like framework for building WeChat mini programs.

What it looks like

flash

Usage

installation

npm install wepy-com-paper-flash --save

Importing the component

For example, on a page index.wpy

// index.wpy
<template>
    // your page WXML here
    <flash/>
</template>
<script>
    import wepy from 'wepy'
    import Flash from 'wepy-com-paper-flash'

    export default class Index extends wepy.page {
        components = {
            flash: Flash
        }
    }
</script>

Displaying a message

Inside of a @tap handler (or anywhere in a wepy component or page), you could invoke the flash to display a message

// index.wpy
  const message = 'Product added to cart'
	this.$invoke('flash', 'showMessage', message)