From 1f531938a331e877aff7972889d14b63991a9172 Mon Sep 17 00:00:00 2001
From: pany <939630029@qq.com>
Date: Wed, 20 Nov 2024 19:58:03 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B7=A6=E4=BE=A7=E5=AF=BC=E8=88=AA?=
 =?UTF-8?q?=E8=8F=9C=E5=8D=95=E5=9C=A8=E9=AB=98=E5=BA=A6=E4=B8=8D=E8=B6=B3?=
 =?UTF-8?q?=E6=97=B6=E6=B8=B2=E6=9F=93=E4=B8=8D=E5=85=A8=E7=9A=84=E9=97=AE?=
 =?UTF-8?q?=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/layouts/LeftTopMode.vue              |  1 +
 src/layouts/components/Sidebar/index.vue | 18 ++----------------
 2 files changed, 3 insertions(+), 16 deletions(-)

diff --git a/src/layouts/LeftTopMode.vue b/src/layouts/LeftTopMode.vue
index 6bd1292..2343052 100644
--- a/src/layouts/LeftTopMode.vue
+++ b/src/layouts/LeftTopMode.vue
@@ -73,6 +73,7 @@ $transition-time: 0.35s;
 }
 
 .sidebar-container {
+  background-color: var(--el-menu-bg-color);
   transition: width $transition-time;
   width: var(--v3-sidebar-width) !important;
   height: 100%;
diff --git a/src/layouts/components/Sidebar/index.vue b/src/layouts/components/Sidebar/index.vue
index efde7c1..4b06ec4 100644
--- a/src/layouts/components/Sidebar/index.vue
+++ b/src/layouts/components/Sidebar/index.vue
@@ -43,10 +43,6 @@ const sidebarMenuHoverBgColor = computed(() => {
 const tipLineWidth = computed(() => {
   return !isTop.value ? "2px" : "0px"
 })
-// 当为顶部模式时隐藏垂直滚动条
-const hiddenScrollbarVerticalBar = computed(() => {
-  return isTop.value ? "none" : "block"
-})
 </script>
 
 <template>
@@ -84,20 +80,15 @@ const hiddenScrollbarVerticalBar = computed(() => {
 
 .has-logo {
   .el-scrollbar {
-    // 多 1% 是为了在左侧模式时侧边栏最底部不显示 1px 左右的白色线条
-    height: calc(101% - var(--v3-header-height));
+    height: calc(100% - var(--v3-header-height));
   }
 }
 
 .el-scrollbar {
-  // 多 1% 是为了在顶部模式时防止垂直滚动
-  height: 101%;
+  height: 100%;
   :deep(.scrollbar-wrapper) {
     // 限制水平宽度
     overflow-x: hidden !important;
-    .el-scrollbar__view {
-      height: 100%;
-    }
   }
   // 滚动条
   :deep(.el-scrollbar__bar) {
@@ -105,16 +96,11 @@ const hiddenScrollbarVerticalBar = computed(() => {
       // 隐藏水平滚动条
       display: none;
     }
-    &.is-vertical {
-      // 当为顶部模式时隐藏垂直滚动条
-      display: v-bind(hiddenScrollbarVerticalBar);
-    }
   }
 }
 
 .el-menu {
   border: none;
-  min-height: 100%;
   width: 100% !important;
 }