<template
<el-button size="mini" type="text">分配权限</el-button>
<el-button size="mini" type="text" @click="btnEditRow(row)"
>编辑</el-button >
<el-popconfirm
title="这是一段内容确定删除吗?"
@onConfirm="confirmDel(row.id)"
>
<el-button
slot="reference"
style="margin-left: 10px"
size="mini"
type="text"
>删除</el-button
>
</el-popconfirm>
</template>
export default {
data() {
return {
pageParams: {
pagesize: 5,
page: 1,
total: 0,
},
}
methods:{
async confirmDel(id) {
await delRole(id);
this.$message.warning("删除成功");
if (this.list.length === 1) {
this.pageParams.page--;
}
this.getRoleList();
},
}
}
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/c30b56b4db4f25d2b43cfc561ece192d.png)