wepy-com-paper-flash

1.0.1 • Public • Published

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)

Readme

Keywords

Package Sidebar

Install

npm i wepy-com-paper-flash

Weekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

4.8 kB

Total Files

6

Last publish

Collaborators

  • johncalvinroberts