Skip to content

Commit 09ccd9f

Browse files
committed
fix: 修复菜单显示不全的问题 添加滚动条
fixed(#328): 页面左侧菜单行高问题
1 parent 679089e commit 09ccd9f

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

src/renderer/layout/components/AppMenu.vue

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,33 @@ const isText = ref(false);
9191
@apply flex-col items-center justify-center transition-all duration-300 w-[100px] px-1;
9292
}
9393
94+
.app-menu-list {
95+
max-height: calc(100vh - 120px); /* 为header预留空间,防止菜单项被遮挡 */
96+
overflow-y: auto;
97+
overflow-x: hidden;
98+
/* 自定义滚动条样式 */
99+
scrollbar-width: thin;
100+
scrollbar-color: rgba(156, 163, 175, 0.5) transparent;
101+
padding-bottom: 20px;
102+
103+
&::-webkit-scrollbar {
104+
width: 4px;
105+
}
106+
107+
&::-webkit-scrollbar-track {
108+
background: transparent;
109+
}
110+
111+
&::-webkit-scrollbar-thumb {
112+
background-color: rgba(156, 163, 175, 0.5);
113+
border-radius: 2px;
114+
115+
&:hover {
116+
background-color: rgba(156, 163, 175, 0.7);
117+
}
118+
}
119+
}
120+
94121
.app-menu-expanded {
95122
@apply w-[160px];
96123
@@ -136,6 +163,8 @@ const isText = ref(false);
136163
137164
&-list {
138165
@apply flex justify-between px-4;
166+
max-height: none !important; /* 移动端不限制高度 */
167+
overflow: visible !important; /* 移动端不需要滚动 */
139168
}
140169
141170
&-item {

0 commit comments

Comments
 (0)