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 想>