this.$confirm("您确定要执行此操作吗?", "提示", {
distinguishCancelAndClose: true,
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {})
.catch(() => {});
})
.catch((action) => {
if (action == "cancel") {
console.log('取消按钮')
} else if (action == "close") {
console.log('关闭按钮')
this.$msgbox.close(); // 重点在这里
}
});
elementUI messageBox弹框组件区分取消和关闭按钮
最新推荐文章于 2024-07-24 17:53:47 发布