fix : 修复标签关闭bug, 表格组件列配置, 完善用户管理页面

This commit is contained in:
2024-09-14 16:44:45 +08:00
parent 556c87812a
commit 5e6fd1420f
17 changed files with 537 additions and 587 deletions

View File

@@ -1,7 +1,7 @@
<template>
<!-- 有子菜单 -->
<template v-for="item in menuItem" :key="item.path">
<el-sub-menu v-if="item?.children?.length>0 && !item.hidden" :index="item.path">
<el-sub-menu v-if="checkMenuItem(item)" :index="item.path">
<template #title>
<svg-icon :name="item.icon"/>
<span>{{ item.title }}</span>
@@ -17,7 +17,9 @@
</a>
</div>
<div v-else>
<svg-icon :name="item.icon"/>
<el-icon>
<svg-icon :name="item.icon" class="menu-item-icon"/>
</el-icon>
<span>{{ item.title }}</span>
</div>
</template>
@@ -44,5 +46,19 @@ const handleGo = (path) => {
}
}
const checkMenuItem = (item) => {
let children = item.children
let childState = false;
if (children){
for (let child of children) {
if (!child.hidden) {
childState = true
break
}
}
}
return item?.children?.length>0 && !item.hidden && childState
}
</script>