修复bug
This commit is contained in:
parent
2f316b0015
commit
1b870c2921
@ -64,12 +64,12 @@
|
|||||||
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
||||||
>
|
>
|
||||||
<!-- <el-table-column type="selection" width="55" /> -->
|
<!-- <el-table-column type="selection" width="55" /> -->
|
||||||
<el-table-column label="上级菜单" prop="pid" show-overflow-tooltip />
|
<!-- <el-table-column label="上级菜单" prop="pid" show-overflow-tooltip>
|
||||||
<!-- <el-table-column
|
<template #default="{ row }">
|
||||||
label="权限类型: M=目录,C=菜单,A=按钮"
|
<span v-if="row.pid == 0">顶级</span>
|
||||||
prop="type"
|
<span v-else>{{ row.parentName }}</span>
|
||||||
show-overflow-tooltip
|
</template>
|
||||||
/> -->
|
</el-table-column> -->
|
||||||
<el-table-column label="菜单名称" prop="name" show-overflow-tooltip />
|
<el-table-column label="菜单名称" prop="name" show-overflow-tooltip />
|
||||||
<el-table-column label="菜单图标" prop="icon" show-overflow-tooltip>
|
<el-table-column label="菜单图标" prop="icon" show-overflow-tooltip>
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
@ -215,5 +215,15 @@ const handleDelete = async (id: number | any[]) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
getLists();
|
getLists();
|
||||||
|
watch(
|
||||||
|
() => pager.lists,
|
||||||
|
(newValue, oldValue) => {
|
||||||
|
newValue.forEach((item: any) => {
|
||||||
|
item.children.forEach((t: any) => {
|
||||||
|
t.parentName = item.name;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -61,6 +61,7 @@
|
|||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
|
<el-table-column label="ID" prop="id" show-overflow-tooltip />
|
||||||
<el-table-column label="名称" prop="name" show-overflow-tooltip />
|
<el-table-column label="名称" prop="name" show-overflow-tooltip />
|
||||||
<el-table-column label="描述" prop="desc" show-overflow-tooltip />
|
<el-table-column label="描述" prop="desc" show-overflow-tooltip />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
Loading…
x
Reference in New Issue
Block a user