Browse Source

fix: update

xiaoxian521 3 years ago
parent
commit
487920375b
1 changed files with 18 additions and 31 deletions
  1. 18 31
      src/style/sidebar.scss

+ 18 - 31
src/style/sidebar.scss

@@ -184,10 +184,6 @@
       cursor: pointer;
       transition: all 0.2s ease;
 
-      // &:hover {
-      //   background: transparent;
-      // }
-
       i {
         font-size: 30px;
         color: #1890ff;
@@ -285,23 +281,18 @@
     .el-menu-item,
     .el-sub-menu__title {
       color: $menuText;
+
+      &:hover {
+        color: $menuTitleHover !important;
+      }
     }
 
     .submenu-title-noDropdown,
     .el-sub-menu__title {
       height: 60px;
       background: $menuBg;
-
-      &:hover {
-        // background-color: transparent !important;
-      }
     }
 
-    // .el-menu-item.is-active {
-    //   transition: color 0.3s;
-    //   color: #fff;
-    // }
-
     .is-active > .el-sub-menu__title,
     .is-active.submenu-title-noDropdown {
       color: $subMenuActiveText !important;
@@ -319,10 +310,6 @@
     }
   }
 
-  // .is-active.submenu-title-noDropdown.outer-most {
-  //   background: transparent;
-  // }
-
   // vertical菜单折叠
   .el-menu--vertical {
     .el-menu--popup {
@@ -364,10 +351,6 @@
       font-size: 12px;
       min-width: $sideBarWidth !important;
       background-color: $subMenuBg !important;
-
-      &:hover {
-        // background-color: transparent !important;
-      }
     }
 
     .el-menu-item,
@@ -404,12 +387,6 @@
     }
   }
 
-  // todo
-  .el-menu--horizontal > .el-menu-item.is-active {
-    transition: color 0.3s;
-    color: $subMenuActiveText !important;
-  }
-
   // horizontal菜单
   .el-menu--horizontal {
     & > .el-sub-menu .el-sub-menu__icon-arrow {
@@ -451,9 +428,9 @@
       min-width: $sideBarWidth !important;
       background-color: $subMenuBg !important;
 
-      // &:hover {
-      //   background-color: transparent !important;
-      // }
+      &:hover {
+        color: $menuTitleHover !important;
+      }
     }
 
     & > .el-menu {
@@ -474,9 +451,19 @@
     .nest-menu .el-sub-menu > .el-sub-menu__title,
     .el-menu-item {
       &:hover {
-        background-color: transparent !important;
+        color: $menuTitleHover !important;
       }
     }
+
+    // 有子集的激活菜单背景
+    .is-active.nest-menu {
+      background: $subMenuActiveBg !important;
+    }
+
+    .el-menu-item.is-active {
+      transition: color 0.3s;
+      color: $subMenuActiveText !important;
+    }
   }
 
   .el-scrollbar__wrap {