From 33f9d4fa4cef685ad21d4fe67ee40907ec76d7a3 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 08 四月 2026 13:04:28 +0800
Subject: [PATCH] 1.样式修改

---
 src/assets/styles/sidebar.scss |  174 +++++++++++++++++++++++++++++++++++++--------------------
 1 files changed, 112 insertions(+), 62 deletions(-)

diff --git a/src/assets/styles/sidebar.scss b/src/assets/styles/sidebar.scss
index 8534448..5dd7d5e 100644
--- a/src/assets/styles/sidebar.scss
+++ b/src/assets/styles/sidebar.scss
@@ -4,7 +4,7 @@
     transition: margin-left 0.28s;
     margin-left: $base-sidebar-width;
     position: relative;
-    background: #f5f7fb;
+    background: transparent;
   }
 
   .sidebarHide {
@@ -22,8 +22,9 @@
     left: 0;
     z-index: 1001;
     overflow: hidden;
-    -webkit-box-shadow: 2px 0 6px rgba(0, 21, 41, 0.35);
-    box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);
+    padding: 12px 0 16px 16px;
+    background: transparent;
+    box-shadow: none;
 
     // reset element-ui css
     .horizontal-collapse-transition {
@@ -45,7 +46,8 @@
 
     &.has-logo {
       .el-scrollbar {
-        height: calc(100% - 50px);
+        height: calc(100% - 72px);
+        margin-top: 10px;
       }
     }
 
@@ -67,6 +69,11 @@
       border: none;
       height: 100%;
       width: 100% !important;
+      padding: 10px 8px 18px;
+      border-radius: 0 28px 28px 0;
+      background: var(--menu-surface);
+      backdrop-filter: blur(18px);
+      box-shadow: var(--shadow-sm);
     }
 
     .el-menu-item,
@@ -81,14 +88,14 @@
     }
 
     // menu hover
-    .sub-menu-title-noDropdown,
-    .el-sub-menu__title {
-      &:hover {
-        background-color: rgba(212, 221, 255, 0.8) !important;
-      }
+    .submenu-title-noDropdown,
+    .el-sub-menu__title {
+      &:hover {
+        background-color: var(--menu-hover) !important;
+      }
     }
     & .theme-light .is-active > .el-sub-menu__title {
-      color: #fff !important;
+      color: var(--current-color) !important;
     }
 
     & .nest-menu .el-sub-menu > .el-sub-menu__title,
@@ -96,10 +103,10 @@
       min-width: $base-sidebar-width !important;
 
       &:hover {
-        background-color: rgba(212, 221, 255, 0.8) !important;
+        background-color: var(--menu-hover) !important;
       }
       &.is-active {
-        background-color: #fff !important;
+        background-color: var(--menu-active-bg) !important;
       }
     }
 
@@ -108,52 +115,91 @@
       //background-color: transparent;
 
       &:hover {
-        background-color: rgba(212, 221, 255, 0.8) !important;
+        background-color: var(--menu-hover) !important;
       }
     }
   }
 
-  .hideSidebar {
-    .sidebar-container {
-      width: 54px !important;
-    }
+  .hideSidebar {
+    .sidebar-container {
+      width: 68px !important;
+      padding-left: 12px;
+      padding-right: 0;
+    }
+
+    .main-container {
+      margin-left: 84px;
+    }
 
-    .main-container {
-      margin-left: 54px;
-    }
-
-    .sub-menu-title-noDropdown {
-      padding: 0 !important;
-      position: relative;
-
-      .el-tooltip {
-        padding: 0 !important;
-
-        .svg-icon {
-          margin-left: 20px;
-        }
-      }
-    }
-    .el-sub-menu {
-      overflow: hidden;
-
-      & > .el-sub-menu__title {
-        padding: 0 !important;
-
-        .svg-icon {
-          margin-left: 20px;
-        }
-      }
-    }
-
-    .el-menu--collapse {
-      .el-sub-menu {
-        & > .el-sub-menu__title {
-          & > span {
-            height: 0;
-            width: 0;
-            overflow: hidden;
-            visibility: hidden;
+    .submenu-title-noDropdown {
+      padding: 0 !important;
+      position: relative;
+      display: flex !important;
+      align-items: center;
+      justify-content: center;
+
+      .el-tooltip {
+        padding: 0 !important;
+        display: inline-flex !important;
+        align-items: center;
+        justify-content: center;
+        width: 100%;
+
+        .svg-icon {
+          margin-left: 0;
+        }
+      }
+
+      .el-menu-tooltip__trigger {
+        width: 100%;
+        display: inline-flex !important;
+        align-items: center;
+        justify-content: center;
+
+        .svg-icon {
+          width: 18px;
+          height: 18px;
+          margin-right: 0;
+          flex-shrink: 0;
+        }
+      }
+    }
+    .el-sub-menu {
+      overflow: hidden;
+
+      & > .el-sub-menu__title {
+        padding: 0 !important;
+        display: flex !important;
+        align-items: center;
+        justify-content: center;
+
+        .svg-icon {
+          margin-left: 0;
+        }
+      }
+    }
+
+    .el-menu--collapse {
+      > .el-menu-item,
+      .el-sub-menu {
+        & > .el-sub-menu__title,
+        &.el-menu-item {
+          display: flex !important;
+          align-items: center;
+          justify-content: center;
+
+          .svg-icon {
+            width: 18px;
+            height: 18px;
+            margin-right: 0;
+            flex-shrink: 0;
+          }
+
+          & > span {
+            height: 0;
+            width: 0;
+            overflow: hidden;
+            visibility: hidden;
             display: inline-block;
           }
           & > i {
@@ -162,11 +208,11 @@
             overflow: hidden;
             visibility: hidden;
             display: inline-block;
-          }
-        }
-      }
-    }
-  }
+          }
+        }
+      }
+    }
+  }
 
   .el-menu--collapse .el-menu .el-sub-menu {
     min-width: $base-sidebar-width !important;
@@ -212,10 +258,10 @@
   .el-menu-item {
     &:hover {
       // you can use $sub-menuHover
-      background-color: rgba(212, 221, 255, 0.56) !important;
+      background-color: var(--menu-hover) !important;
     }
     &.is-active {
-      background-color: rgba(212, 221, 255, 0.56) !important;
+      background-color: var(--menu-active-bg) !important;
     }
   }
 
@@ -223,9 +269,13 @@
   > .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: #d3dce6;
+      background: #dfe7e1;
     }
 
     &::-webkit-scrollbar {
@@ -233,7 +283,7 @@
     }
 
     &::-webkit-scrollbar-thumb {
-      background: #99a9bf;
+      background: #9aa79e;
       border-radius: 20px;
     }
   }

--
Gitblit v1.9.3