需求: 点击按钮,弹框出现左右按钮,点击左右按钮分别再次弹框。
注意:需要使用then和catch进行捕获
projectAudPub(id, name) {
this.$confirm(`审核 ${name}`, "提示", {
type: "warning",
confirmButtonText: "审核通过",
cancelButtonText: "审核不通过",
}).then((action) => {
if (action == "confirm") {
this.$confirm(`项目将会自动发布,确认审核通过 ${name}`, "提示", {
type: "success",
confirmButtonText: "确定",
cancelButtonText: "取消",
});
}
}).catch(err =>{
if(err=="cancel"){
this.$confirm(`项目须重新编辑后提审,确认审核不通 ${name}`, "提示", {
type: "error",
confirmButtonText: "确定",
cancelButtonText: "取消",
});
}
});
},
点击按钮,展示弹框,
点击审核通过,展示弹框02,
点击审核不通过,展示弹框03
点击审核通过,跳出的弹框02
点击审核不通过,跳出的弹框03