最近搜索

小程序 弹出 窗口

浏览:618
管理员 2020-06-30 08:34

https://developers.weixin.qq.com/miniprogram/dev/api/ui/interaction/wx.showToast.html

文档这里查看



wx.showToast({
title: '成功',
icon: 'success',
duration: 2000
})

image.png  image.png













wx.showToast({
title: res.data.msg,
icon: 'none',
duration: 2000
})

image.png





加载中


wx.showLoading({
title: '加载中',
mask:true
})
 
 mask:true   背景按钮不能点击。
 
 
setTimeout(function () {
wx.hideLoading()
}, 2000)


image.png



带  确定  取消的窗口  模态窗口 

wx.showModal({
  title: '提示',
  content: '这是一个模态弹窗',
  success (res) {
    if (res.confirm) {
      console.log('用户点击确定')
    } else if (res.cancel) {
      console.log('用户点击取消')
    }
  }})

image.png



联系站长

站长微信:xiaomao0055

站长QQ:14496453