elmentui删除判断 弹框
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteUser(val.userID).then(res => {
if (res.success) {
this.$message.success('删除成功');
this.loadData();
} else {
this.$message.error(res.msg);
}
});
}).catch(() => {
});
拼接写法
this.$confirm(`确定${data.isPublished ? "使用" : "禁用"}当前客服吗?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消"
}).then(() => {
})