From 8efe771cc70f530992af95f672ff1167c5b30402 Mon Sep 17 00:00:00 2001
From: birt <2499248221@qq.com>
Date: 星期日, 13 四月 2025 12:56:00 +0800
Subject: [PATCH] 123

---
 zhitan-vue/src/layout/components/Sidebar/index.vue |   37 ++++++++++++++++++++++++++++++++++---
 1 files changed, 34 insertions(+), 3 deletions(-)

diff --git a/zhitan-vue/src/layout/components/Sidebar/index.vue b/zhitan-vue/src/layout/components/Sidebar/index.vue
index 603f4f2..b446637 100644
--- a/zhitan-vue/src/layout/components/Sidebar/index.vue
+++ b/zhitan-vue/src/layout/components/Sidebar/index.vue
@@ -2,8 +2,9 @@
   <div
     :class="{ 'has-logo': showLogo }"
     :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }"
+    class="sidebar-container-wrapper"
   >
-    <el-scrollbar :class="sideTheme" wrap-class="scrollbar-wrapper">
+    <el-scrollbar :class="sideTheme" wrap-class="scrollbar-wrapper" view-class="scrollbar-view">
       <!-- 棣栭〉鏃朵笉鏄剧ず浠讳綍鑿滃崟椤� -->
       <el-menu
         v-if="!isHomePage"
@@ -152,9 +153,38 @@
 }
 </script>
 <style lang="scss" scoped>
+.sidebar-container-wrapper {
+  position: relative;
+  height: 100%;
+  overflow: hidden;
+  display: flex;
+  flex-direction: column;
+}
+
+:deep(.scrollbar-wrapper) {
+  height: calc(100% - 290px) !important;
+  overflow-x: hidden !important;
+}
+
+:deep(.scrollbar-view) {
+  height: 100%;
+}
+
+:deep(.el-scrollbar__bar.is-vertical) {
+  right: 0;
+  width: 6px;
+}
+
+:deep(.el-scrollbar__thumb) {
+  background-color: rgba(144, 147, 153, 0.3);
+  &:hover {
+    background-color: rgba(144, 147, 153, 0.5);
+  }
+}
+
 :deep(.custom-menu) {
   padding: 6px 0;
-  height: calc(100% - 150px); // 鐣欏嚭搴曢儴鐢ㄦ埛鍖哄煙鐨勭┖闂�
+  height: auto !important; // 鏀逛负鑷�傚簲楂樺害锛岄伩鍏嶅浐瀹氶珮搴﹀鑷村唴瀹规孩鍑�
   
   // Override Element Plus default menu styles
   .el-menu-item {
@@ -209,7 +239,8 @@
 
 // 棣栭〉绌虹櫧鑿滃崟鍖哄煙鏍峰紡
 .home-empty-menu {
-  height: calc(100% - 150px);
+  height: auto;
+  min-height: 100px;
 }
 
 // 搴曢儴鐢ㄦ埛鍖哄煙鏍峰紡

--
Gitblit v1.9.3