diff --git a/src/assets/styles/sidebar.scss b/src/assets/styles/sidebar.scss index e576912..a1b86d5 100644 --- a/src/assets/styles/sidebar.scss +++ b/src/assets/styles/sidebar.scss @@ -91,11 +91,12 @@ // 暗色主题样式 & .theme-dark { - .is-active > .el-sub-menu__title { + // 父菜单在子菜单选中时不高亮(只高亮子菜单项) + .el-sub-menu.is-active > .el-sub-menu__title { color: vars.$base-menu-color-active !important; - background-color: rgba(255, 255, 255, 0.25) !important; - font-weight: 600; - box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.1); + background-color: transparent !important; + font-weight: normal !important; + box-shadow: none !important; } .el-menu-item.is-active { @@ -155,11 +156,12 @@ } } - .is-active > .el-sub-menu__title { - color: vars.$menuLightActiveText !important; - background-color: vars.$menuLightActiveBg !important; - font-weight: 700; - box-shadow: inset 0 0 10px rgba(22, 119, 255, 0.08); + // 父菜单在子菜单选中时不高亮(只高亮子菜单项) + .el-sub-menu.is-active > .el-sub-menu__title { + color: vars.$menuLightText !important; + background-color: transparent !important; + font-weight: normal !important; + box-shadow: none !important; } // 嵌套菜单项样式 @@ -229,6 +231,14 @@ box-shadow: 0 0 4px rgba(255, 255, 255, 0.5); } } + + // 暗色主题:父菜单在子菜单选中时不高亮 + & .theme-dark .el-sub-menu.is-active > .el-sub-menu__title { + color: vars.$base-menu-color !important; + background-color: transparent !important; + font-weight: normal !important; + box-shadow: none !important; + } } .hideSidebar { diff --git a/src/views/index.vue b/src/views/index.vue index 6951d87..ba2701a 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -16,15 +16,18 @@ 短信发送管理系统 - +
- + + {{ item.title }}
@@ -35,19 +38,56 @@