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(() => {
 
})
posted @ 2020-11-18 13:08  子不语~  阅读(158)  评论(0编辑  收藏  举报