diff --git a/src/layout/components/sidebar/sidebarItem.vue b/src/layout/components/sidebar/sidebarItem.vue index ee2eb568d..160ddb417 100644 --- a/src/layout/components/sidebar/sidebarItem.vue +++ b/src/layout/components/sidebar/sidebarItem.vue @@ -55,19 +55,23 @@ function resolvePath(routePath) { - {{ $t(onlyOneChild.meta.title) }} - + + {{ $t(onlyOneChild.meta.title) }} + + @@ -79,7 +83,7 @@ function resolvePath(routePath) { popper-append-to-body > - + {{ $t(props.item.meta.title) }} { router :collapse-transition="false" mode="vertical" + class="outer-most" @select="menuSelect" > diff --git a/src/style/sidebar.scss b/src/style/sidebar.scss index 57ba1b039..59339a58d 100644 --- a/src/style/sidebar.scss +++ b/src/style/sidebar.scss @@ -299,6 +299,11 @@ color: $menuText; background-color: $subMenuBg; + span { + font-size: 12px; + margin-left: 10px; + } + &:hover { background-color: $subMenuHover; } @@ -306,6 +311,10 @@ .el-sub-menu__title { color: $menuText; + + span { + margin-left: 10px; + } } } @@ -371,6 +380,11 @@ color: $menuText; background-color: $subMenuBg; + span { + font-size: 12px; + margin-left: 10px; + } + &:hover { background-color: $subMenuHover; } @@ -378,6 +392,10 @@ .el-sub-menu__title { color: $menuText; + + span { + margin-left: 10px; + } } } @@ -435,6 +453,32 @@ min-width: $sideBarWidth !important; } + // 有子菜单 + .el-menu--collapse + .is-active.outer-most.el-sub-menu + > .el-sub-menu__title::before { + position: absolute; + top: 0; + left: 5px; + width: 3px; + height: 100%; + background-color: #1890ff !important; + content: ""; + clear: both; + } + + // 无子菜单 + .el-menu--collapse .is-active.submenu-title-noDropdown.outer-most::before { + position: absolute; + top: 0; + left: 5px; + width: 3px; + height: 100%; + background-color: #1890ff !important; + content: ""; + clear: both; + } + // 手机端 .mobile { .fixed-header {