调用mint-ui message box confirm方法后点击确认和取消后如何执行对应的回调函数
MessageBox.confirm('', {
message: 'xxx,你确定?',
title: '提示',
confirmButtonText: 'abc',
cancelButtonText: '123'
}).then(action => {
if (action == 'confirm') { //确认的回调
console.log(1);
}
}).catch(err => {
if (err == 'cancel') { //取消的回调
console.log(2);
}
});
本文介绍如何使用mint-uimessageboxconfirm方法实现确认框,并通过.then和.catch方法来处理用户点击确认或取消后的回调操作。示例中详细展示了如何设置提示信息、按钮文本等属性。
394

被折叠的 条评论
为什么被折叠?



