1.删除确认弹窗(带按钮的弹框)
del(){
var that=this;
wx.showModal({
title: '提示',
content: '您确定删除该记录吗?',
success: function (res) {
if (res.confirm) {
that.delete();//调用删除方法
} else if (res.cancel) {
console.log("取消删除")
}
}
})
}
2.普通弹窗(没有按钮的弹窗)
fun(){
wx.showToast({
title: '提示内容',
icon: 'none',
duration: 2000//持续的时间
})
}