From 09ccd9f2a67e886368464777eb558518ab639d6d Mon Sep 17 00:00:00 2001 From: alger Date: Tue, 29 Jul 2025 22:57:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=B8=8D=E5=85=A8=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20=E6=B7=BB=E5=8A=A0=E6=BB=9A=E5=8A=A8=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixed(#328): 页面左侧菜单行高问题 --- src/renderer/layout/components/AppMenu.vue | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/renderer/layout/components/AppMenu.vue b/src/renderer/layout/components/AppMenu.vue index aa169ca..47e82b6 100644 --- a/src/renderer/layout/components/AppMenu.vue +++ b/src/renderer/layout/components/AppMenu.vue @@ -91,6 +91,33 @@ const isText = ref(false); @apply flex-col items-center justify-center transition-all duration-300 w-[100px] px-1; } +.app-menu-list { + max-height: calc(100vh - 120px); /* 为header预留空间,防止菜单项被遮挡 */ + overflow-y: auto; + overflow-x: hidden; + /* 自定义滚动条样式 */ + scrollbar-width: thin; + scrollbar-color: rgba(156, 163, 175, 0.5) transparent; + padding-bottom: 20px; + + &::-webkit-scrollbar { + width: 4px; + } + + &::-webkit-scrollbar-track { + background: transparent; + } + + &::-webkit-scrollbar-thumb { + background-color: rgba(156, 163, 175, 0.5); + border-radius: 2px; + + &:hover { + background-color: rgba(156, 163, 175, 0.7); + } + } +} + .app-menu-expanded { @apply w-[160px]; @@ -136,6 +163,8 @@ const isText = ref(false); &-list { @apply flex justify-between px-4; + max-height: none !important; /* 移动端不限制高度 */ + overflow: visible !important; /* 移动端不需要滚动 */ } &-item {