From ff609c6ba2f52818dad141407c3265abc883eb4f Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 18 五月 2026 17:38:09 +0800
Subject: [PATCH] 进销存pro 1.菜单栏样式修改

---
 src/assets/styles/sidebar.scss |  395 ++++++++++++++++++++++++++++++--------------------------
 1 files changed, 212 insertions(+), 183 deletions(-)

diff --git a/src/assets/styles/sidebar.scss b/src/assets/styles/sidebar.scss
index 15d8078..de49985 100644
--- a/src/assets/styles/sidebar.scss
+++ b/src/assets/styles/sidebar.scss
@@ -1,133 +1,152 @@
-#app {
-  .main-container {
-    min-height: 100%;
-    transition: margin-left 0.28s;
-    margin-left: $base-sidebar-width;
-    position: relative;
-    background: transparent;
-  }
-
-  .sidebarHide {
-    margin-left: 0 !important;
-  }
-
-  .sidebar-container {
-    transition: width 0.28s;
-    width: $base-sidebar-width !important;
-    height: 100%;
-    position: fixed;
-    font-size: 0px;
-    top: 0;
-    bottom: 0;
-    left: 0;
-    z-index: 1001;
-    overflow: hidden;
-    padding: 12px 0 16px 16px;
-    background: transparent;
-    box-shadow: none;
-
-    // reset element-ui css
-    .horizontal-collapse-transition {
-      transition: 0s width ease-in-out, 0s padding-left ease-in-out,
-        0s padding-right ease-in-out;
-    }
-
-    .scrollbar-wrapper {
-      overflow-x: hidden !important;
-    }
-
-    .el-scrollbar__bar.is-vertical {
-      right: 0px;
-    }
-
-    .el-scrollbar {
-      height: 100%;
-    }
-
-    &.has-logo {
-      .el-scrollbar {
-        height: calc(100% - 72px);
-        margin-top: 10px;
-      }
-    }
-
-    .is-horizontal {
-      display: none;
-    }
-
-    a {
-      display: inline-block;
-      width: 100%;
-      overflow: hidden;
-    }
-
-    .svg-icon {
-      margin-right: 16px;
-    }
-
-    .el-menu {
-      border: none;
-      height: 100%;
-      width: 100% !important;
-      padding: 10px 8px 18px;
-      border-radius: 22px;
-      background: var(--menu-surface);
-      backdrop-filter: blur(18px);
-      box-shadow: var(--shadow-sm);
+#app {
+  .main-container {
+    min-height: 100%;
+    transition: margin-left 0.28s;
+    margin-left: $base-sidebar-width;
+    position: relative;
+    background: transparent;
+  }
+
+  .sidebarHide {
+    margin-left: 0 !important;
+  }
+
+  .sidebar-container {
+    transition: width 0.28s;
+    width: $base-sidebar-width !important;
+    height: 100%;
+    position: fixed;
+    font-size: 0px;
+    top: 0;
+    bottom: 0;
+    left: 0;
+    z-index: 1001;
+    overflow: hidden;
+    padding: 12px 0 16px 16px;
+    background: transparent;
+    box-shadow: none;
+
+    // reset element-ui css
+    .horizontal-collapse-transition {
+      transition: 0s width ease-in-out, 0s padding-left ease-in-out,
+        0s padding-right ease-in-out;
     }
-
-    .el-menu-item,
-    .menu-title {
-      overflow: hidden !important;
-      text-overflow: ellipsis !important;
-      white-space: nowrap !important;
-    }
-
-    .el-menu-item .el-menu-tooltip__trigger {
-      display: inline-block !important;
-    }
-
-    // menu hover
-    .submenu-title-noDropdown,
-    .el-sub-menu__title {
-      &:hover {
-        background-color: var(--menu-hover) !important;
-        border-radius: 14px;
+
+    .scrollbar-wrapper {
+      overflow-x: hidden !important;
+    }
+
+    .el-scrollbar__bar.is-vertical {
+      right: 0px;
+    }
+
+    .el-scrollbar {
+      height: 100%;
+    }
+
+    &.has-logo {
+      .el-scrollbar {
+        height: calc(100% - 72px);
+        margin-top: 10px;
       }
     }
-    & .theme-light .is-active > .el-sub-menu__title {
-      color: var(--current-color) !important;
-    }
-
+
+    .is-horizontal {
+      display: none;
+    }
+
+    a {
+      display: inline-block;
+      width: 100%;
+      overflow: hidden;
+    }
+
+    .svg-icon {
+      margin-right: 16px;
+    }
+
+    .el-menu {
+      border: 1px solid var(--surface-border) !important;
+      height: 100%;
+      width: 100% !important;
+      padding: 12px 10px 20px;
+      border-radius: var(--radius-lg);
+      background: var(--menu-surface);
+      backdrop-filter: blur(20px);
+      box-shadow: var(--shadow-sm);
+      transition: all 0.3s ease;
+    }
+
+    .el-menu-item,
+    .menu-title {
+      overflow: hidden !important;
+      text-overflow: ellipsis !important;
+      white-space: nowrap !important;
+    }
+
+    .el-menu-item .el-menu-tooltip__trigger {
+      display: inline-block !important;
+    }
+
+    // menu hover - 浼樺寲鍚庣殑鎮仠鏁堟灉
+    .submenu-title-noDropdown,
+    .el-sub-menu__title {
+      transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
+      border: none !important;
+      
+      &:hover {
+        background-color: var(--menu-hover) !important;
+        border-radius: var(--radius-sm);
+        transform: translateX(2px);
+      }
+    }
+    
+    & .theme-light .is-active > .el-sub-menu__title,
+    & .theme-dark .is-active > .el-sub-menu__title {
+      color: var(--menu-active-text) !important;
+      background: var(--menu-active-bg) !important;
+      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
+      border: none !important;
+    }
+
     & .nest-menu .el-sub-menu > .el-sub-menu__title,
     & .el-sub-menu .el-menu-item {
       min-width: 0 !important;
-      margin: 0 12px 6px;
-      width: calc(100% - 24px);
-      padding-left: 8px !important;
-      padding-right: 8px !important;
+      margin: 0 10px 5px;
+      width: calc(100% - 20px);
+      padding-left: 10px !important;
+      padding-right: 10px !important;
       box-sizing: border-box;
+      border-radius: var(--radius-xs);
+      transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
+      color: var(--sidebar-text);
+      border: none !important;
 
       &:hover {
         background-color: var(--menu-hover) !important;
+        transform: translateX(2px);
       }
+      
       &.is-active {
-        background-color: var(--menu-active-bg) !important;
-        border-radius: 14px;
+        background: var(--menu-active-bg) !important;
+        border-radius: var(--radius-sm);
+        color: var(--menu-active-text) !important;
+        font-weight: 500;
+        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
       }
     }
-
-    & .theme-light .nest-menu .el-sub-menu > .el-sub-menu__title,
-    & .theme-light .el-sub-menu .el-menu-item {
-      //background-color: transparent;
 
+    & .theme-light .nest-menu .el-sub-menu > .el-sub-menu__title,
+    & .theme-light .el-sub-menu .el-menu-item,
+    & .theme-dark .nest-menu .el-sub-menu > .el-sub-menu__title,
+    & .theme-dark .el-sub-menu .el-menu-item {
       &:hover {
         background-color: var(--menu-hover) !important;
-        border-radius: 14px;
+        border-radius: var(--radius-xs);
       }
     }
   }
-
+
   .hideSidebar {
     .sidebar-container {
       width: 68px !important;
@@ -138,7 +157,7 @@
     .main-container {
       margin-left: 84px;
     }
-
+
     .submenu-title-noDropdown {
       padding: 0 !important;
       position: relative;
@@ -231,86 +250,96 @@
       }
     }
   }
-
-  .el-menu--collapse .el-menu .el-sub-menu {
-    min-width: $base-sidebar-width !important;
-  }
-
-  // mobile responsive
-  .mobile {
-    .main-container {
-      margin-left: 0px;
-    }
-
-    .sidebar-container {
-      transition: transform 0.28s;
-      width: $base-sidebar-width !important;
-    }
-
-    &.hideSidebar {
-      .sidebar-container {
-        pointer-events: none;
-        transition-duration: 0.3s;
-        transform: translate3d(-$base-sidebar-width, 0, 0);
-      }
-    }
-  }
-
-  .withoutAnimation {
-    .main-container,
-    .sidebar-container {
-      transition: none;
-    }
-  }
-}
-
-// when menu collapsed
-.el-menu--vertical {
-  & > .el-menu {
-    .svg-icon {
-      margin-right: 16px;
-    }
-  }
-
+
+  .el-menu--collapse .el-menu .el-sub-menu {
+    min-width: $base-sidebar-width !important;
+  }
+
+  // mobile responsive
+  .mobile {
+    .main-container {
+      margin-left: 0px;
+    }
+
+    .sidebar-container {
+      transition: transform 0.28s;
+      width: $base-sidebar-width !important;
+    }
+
+    &.hideSidebar {
+      .sidebar-container {
+        pointer-events: none;
+        transition-duration: 0.3s;
+        transform: translate3d(-$base-sidebar-width, 0, 0);
+      }
+    }
+  }
+
+  .withoutAnimation {
+    .main-container,
+    .sidebar-container {
+      transition: none;
+    }
+  }
+}
+
+// when menu collapsed
+.el-menu--vertical {
+  & > .el-menu {
+    .svg-icon {
+      margin-right: 14px;
+    }
+  }
+
   .nest-menu .el-sub-menu > .el-sub-menu__title,
   .el-menu-item {
     min-width: 0 !important;
-    margin: 0 12px 6px;
-    width: calc(100% - 24px);
-    padding-left: 8px !important;
-    padding-right: 8px !important;
+    margin: 0 10px 5px;
+    width: calc(100% - 20px);
+    padding-left: 10px !important;
+    padding-right: 10px !important;
     box-sizing: border-box;
+    border-radius: var(--radius-xs);
+    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
+    color: var(--sidebar-text);
+    border: none !important;
 
     &:hover {
-      // you can use $sub-menuHover
       background-color: var(--menu-hover) !important;
+      transform: translateX(2px);
     }
+    
     &.is-active {
-      background-color: var(--menu-active-bg) !important;
-      border-radius: 14px;
+      background: var(--menu-active-bg) !important;
+      color: var(--menu-active-text) !important;
+      border-radius: var(--radius-sm);
+      font-weight: 500;
+      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
     }
   }
-
-  // the scroll bar appears when the sub-menu is too long
-  > .el-menu--popup {
-    max-height: 100vh;
-    overflow-y: auto;
-    padding: 8px;
-    border-radius: 18px;
-    border: 1px solid var(--surface-border);
-    box-shadow: var(--shadow-md);
-
-    &::-webkit-scrollbar-track-piece {
-      background: #dfe7e1;
-    }
-
-    &::-webkit-scrollbar {
-      width: 6px;
-    }
-
-    &::-webkit-scrollbar-thumb {
-      background: #9aa79e;
-      border-radius: 20px;
-    }
-  }
-}
+
+  // the scroll bar appears when the sub-menu is too long
+  > .el-menu--popup {
+    max-height: 100vh;
+    overflow-y: auto;
+    padding: 10px;
+    border-radius: var(--radius-md);
+    border: 1px solid var(--surface-border);
+    box-shadow: var(--shadow-md);
+    background: var(--menu-surface);
+    backdrop-filter: blur(20px);
+
+    &::-webkit-scrollbar-track-piece {
+      background: var(--surface-muted);
+    }
+
+    &::-webkit-scrollbar {
+      width: 5px;
+    }
+
+    &::-webkit-scrollbar-thumb {
+      background: var(--accent-light);
+      border-radius: 10px;
+    }
+  }
+}

--
Gitblit v1.9.3