1.在main.js中引入
//引入
import { MessageBox } from 'mint-ui';
MessageBox.confirm('', {
message: '您确定提交订单吗?',
title: '温馨提示',
confirmButtonText: '确定',
cancelButtonText: '取消'
})
.then(action => {
if (action == 'confirm') { //确认的回调
console.log(1);
}
})
.catch(err => {
if (err == 'cancel') { //取消的回调
console.log(2);
}
});