在el-table中使用el-popover,没法点击确定或取消来关闭添加 多个按钮

editFlag(id) {
this.delLoading = true
editFlag(id).then(res => {
this.delLoading = false
this. r e f s [ ′ f l a g − ′ + i d ] . d o C l o s e ( ) t h i s . d l e C h a n g e P a g e ( ) t h i s . i n i t ( ) t h i s . refs['flag-' + id].doClose() this.dleChangePage() this.init() this. refs[flag+id].doClose()this.dleChangePage()this.init()this.notify({
title: ‘废止成功’,
type: ‘success’,
duration: 2500
})

List item

  }).catch(err => {
    this.delLoading = false
    this.$refs['flag-' + id].doClose()
    console.log(err.response.data.message)
  })
},subDelete(id) {
  this.delLoading = true
  del(id).then(res => {
    this.delLoading = false
    this.$refs['del-' + id].doClose()
    this.dleChangePage()
    this.init()
    this.$notify({
      title: '删除成功',
      type: 'success',
      duration: 2500
    })
  }).catch(err => {
    this.delLoading = false
    this.$refs['del-' + id].doClose()
    console.log(err.response.data.message)
  })
},
  • <el-popover 组件
    v-permission="[‘ADMIN’,‘FTZK_ALL’,‘FTZK_DELETE’]"
    :ref="‘del-’+scope.row.id"
    placement=“top”
    width=“180”>

    确定删除本条数据吗?


    <div 想 style=“text-align: right; margin: 0”>
    <el-button size=“mini” type=“text” @click="$refs[‘del-’+scope.row.id].doClose()">取消
    <el-button :loading=“delLoading” type=“primary” size=“mini” @click=“subDelete(scope.row.id)”>确定
    </div 想>
    <el-button 想slot=“reference” type=“danger” icon=“el-icon-delete” size=“mini”/>
    </el-popover 想>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值