时间: 2020-08-23|51次围观|0 条评论

一、模态窗口

wx.showModal

 delete(){    wx.showModal({      title: '',      content: '是否确认删除',      success(res) {        if (res.confirm) {          console.log('用户点击确定')        } else if (res.cancel) {          console.log('用户点击取消')        }      }    })  }
微信小程序之几种常见的弹框提示信息插图
二、提示你想提示的信息

提示你想提示的信息

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

注意

三、显示 loading 提示框

wx.showLoading

wx.showLoading({  title: '加载中',})setTimeout(function () {  wx.hideLoading()}, 2000)
四、 wx.showActionSheet(OBJECT)
wx.showActionSheet({  itemList: ['A', 'B', 'C'],  success: function(res) {    console.log(res.tapIndex)  },  fail: function(res) {    console.log(res.errMsg)  }})

文章转载于:https://www.jianshu.com/p/1dac876dbbdb

原著是一个有趣的人,若有侵权,请通知删除

本博客所有文章如无特别注明均为原创。
复制或转载请以超链接形式注明转自起风了,原文地址《微信小程序之几种常见的弹框提示信息
   

还没有人抢沙发呢~