editFlag(id) {
this.delLoading = true
editFlag(id).then(res => {
this.delLoading = false
this.refs[′flag−′+id].doClose()this.dleChangePage()this.init()this.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 = falsethis.$refs['flag-' + id].doClose()console.log(err.response.data.message)})},subDelete(id) {this.delLoading = truedel(id).then(res => {this.delLoading = falsethis.$refs['del-' + id].doClose()this.dleChangePage()this.init()this.$notify({title: '删除成功',type: 'success',duration: 2500})}).catch(err => {this.delLoading = falsethis.$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 想>