wx.showToast

2018-06-23  本文已影响0人  刷爆服务器

icon的使用

icon主要有三种,success,loading和none

wx.showToast({
  title: '成功',
  icon: 'success',
  duration: 4000 //延时时间长一点好截图
})
wx.showToast({
        title: '加载',
        icon: 'loading',
        duration: 4000
    })
primary: function(){
    wx.showToast({
        title: 'hi',
        icon: 'none',
        duration: 4000
    })

image的使用

primary: function(){
    wx.showToast({
        title: 'hi',
        image: '../../images/1.png', //image的优先级比icon高,所以不显示icon
        icon: 'loading',
        duration: 4000 
    })
上一篇 下一篇

猜你喜欢

热点阅读