Skip to content

johncalvinroberts/wepy-com-paper-flash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published