fix : 修复标签关闭bug, 表格组件列配置, 完善用户管理页面
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<div>
|
||||
<router-link
|
||||
v-for="item in tagsViewStore.visitedViews"
|
||||
:key="item.path" :to="{ path: item.path }" class="tag"
|
||||
:key="item.path" :to="{ path: item.path, query: item.query }" class="tag"
|
||||
:class="isActive(item) ? 'active' : ''"
|
||||
@click.prevent
|
||||
@contextmenu.prevent.native="openMenu(item, $event)">
|
||||
@@ -83,7 +83,7 @@ init()
|
||||
border: 1px solid darkgray;
|
||||
font-size: 13px;
|
||||
margin-right: 8px;
|
||||
border-radius: 4px;
|
||||
border-radius: 6px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user