element tag标签点出现messageBox提示框

 点1 2 3 右边的x弹框

<el-table-column 
                       type="expand">
        <template slot-scope="scope">
          <el-row v-for="(item) in scope.row.date1"
                  :key="item">
            <el-col :span="5">
              <el-tag>{{item}}</el-tag>
              <i class="el-icon-caret-right"></i>
            </el-col>
            <el-col :span="19">
              <el-row :gutter="20">
                <el-col :span="10"
                        style="background-color: pink; margin: 0 .625rem; text-align: center;">
                  <el-tag type="success"
                          closable
                          v-for="item in tableData[0].date1"
                          :key="item"
                          @close="handleClose(item)">{{item}}</el-tag>
                </el-col>
                <el-col :span="12 "
                        style="background-color:red; ">
                </el-col>
              </el-row>
            </el-col>
          </el-row>
        </template>
      </el-table-column>







methods: {
 async handleClose (tag) {
      // const confirmResult = await this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
         this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      })
        .then(() => {
          this.$message({
            type: 'success',
            message: '删除成功!'
          })
          this.tableData[0].date1.splice(this.tableData[0].date1.indexOf(tag), 1)
        })
        .catch(() => {
          this.$message({
            type: 'info',
            message: '已取消删除'
          });
        });
      //  .catch((err) => {
      //    return err
      // });
      // console.log(confirmResult)
    },

 常量 confirmResult 点确定按钮 返回confirm字符串 点取消返还cancel字符串 可以 通过 if(confirm==xxx){进行逻辑处理}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值