1、uniapp中的弹框提示功能
uni.showModal({
title: '提示',
content: '是否退出',
confirmText: '确定',
cancelText:'取消',
success: res => {
if (res.confirm) {
that.$util.redirectToHome(true);
} else {
}
}
});
2、微信小程序中的弹框提示功能
wx.showModal({
title: "提示",
content: "是否退出!",
confirmText:"确定",
cancelText:"取消",
success: function (res) {
if(res.confirm){
}else{
}
}
})
3、vue前段中
1、main.js中
import {MessageBox} from 'element-ui'
Vue.prototype.$messageBox= MessageBox;
2、使用:
this.$messageBox
.confirm("是否退出!", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
})
.catch(() => {});