wx.showModal
delete(){
wx.showModal({
title: '',
content: '是否確認(rèn)刪除',
success(res) {
if (res.confirm) {
console.log('用戶點(diǎn)擊確定')
} else if (res.cancel) {
console.log('用戶點(diǎn)擊取消')
}
}
})
}
|

提示你想提示的信息
wx.showToast({
title: '成功',
icon: 'success',
duration: 2000
})
|
注意
wx.showLoading 和 wx.showToast 同時(shí)只能顯示一個(gè)
wx.showToast 應(yīng)與 wx.hideToast 配對(duì)使用
wx.showLoading
wx.showLoading({
title: '加載中',
})
setTimeout(function () {
wx.hideLoading()
}, 2000)
|
wx.showActionSheet({
itemList: ['A', 'B', 'C'],
success: function(res) {
console.log(res.tapIndex)
},
fail: function(res) {
console.log(res.errMsg)
}
|