From 4a8efc53405efe0d20312694d39fbd8184badb39 Mon Sep 17 00:00:00 2001
From: yuyu <1981343953@qq.com>
Date: 星期二, 15 八月 2023 17:14:23 +0800
Subject: [PATCH] 8.15提交
---
src/layout/components/Sidebar/SidebarItem.vue | 23 +++++++++++++++++++++--
1 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue
index 0fd21c9..e5b588f 100644
--- a/src/layout/components/Sidebar/SidebarItem.vue
+++ b/src/layout/components/Sidebar/SidebarItem.vue
@@ -2,8 +2,14 @@
<div v-if="!item.hidden">
<template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow">
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
- <el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
- <item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" />
+
+ <el-menu-item v-if="onlyOneChild.meta.show==false ?onlyOneChild.meta.show: true" :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
+ <!-- <el-menu-item :style="{width:'0px',height:'0px'}" v-if="onlyOneChild.meta.show==false ?onlyOneChild.meta.show: true" :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}"> -->
+ <!-- <template slot="title">
+ <item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="item.meta.title" />
+ </template> -->
+ <item :show="onlyOneChild.meta.show" :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" />
+ <span v-if="onlyOneChild.meta.title==='涓婚〉'">涓婚〉</span>
</el-menu-item>
</app-link>
</template>
@@ -56,6 +62,9 @@
this.onlyOneChild = null
return {}
},
+ created() {
+ // console.log(this.item)
+ },
methods: {
hasOneShowingChild(children = [], parent) {
const showingChildren = children.filter(item => {
@@ -93,3 +102,13 @@
}
}
</script>
+<style scoped>
+/* 鏂囧瓧 */
+::v-deep.el-submenu.is-active > .el-submenu__title {
+ color: #409eff !important;
+}
+/* icon鍥炬爣涔熻窡鐫�鍙� */
+::v-deep .el-submenu.is-active > .el-submenu__title i {
+ color: #409eff !important;
+}
+</style>
--
Gitblit v1.9.3