1.先安装组件
npm install wepy-com-toast --save
2.引入wepy和toast

    import wepy from 'wepy'
    import Toast from 'wepy-com-toast'

3.在组件里面去定义

       components = {
            toast: Toast,
            purchaselist:purchaseList,
            reportlist:reportList,
        }

4.去定义图标以及文字

      toast (title) {
            let promise = this.$invoke('toast', 'show', {
              title: title,
              img: ''
            })

            promise.then((d) => {
              // console.log('toast done')
            })
        }
posted on 2018-10-19 11:38  周小姐你好  阅读(360)  评论(0编辑  收藏  举报