Skip to content

Commit 9508024

Browse files
committed
更新 layout.scss 文件:
1) 移除不必要的 overflow 属性; 2) 将 el-scrollbar 的高度设置为 flex: 1,以确保高度占满容器; 3) 为按钮添加右边距,以确保按钮右边有足够空间显示边框。
1 parent ec831d5 commit 9508024

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/components/styles/layout.scss

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,8 @@
6060
display: flex;
6161
flex-direction: column;
6262
gap: v.$spacing-xs;
63-
height: 320px; // 固定高度
63+
height: 320px;
6464
margin: 0 auto;
65-
overflow: hidden;
6665
transition: all 0.3s ease;
6766

6867
@media (max-width: 768px) {
@@ -93,26 +92,26 @@
9392
flex: 1;
9493
min-height: 0; // 允许元素在flex布局中收缩
9594
position: relative;
96-
overflow: hidden;
97-
max-height: calc(100% - 50px); // 减去搜索框的高度和间距
98-
padding-right: v.$spacing-md; // 减小右侧padding,因为scrollbar已经占据了一定空间
9995
display: flex; // 添加 flex 布局
10096
flex-direction: column; // 垂直方向布局
10197

10298
:deep(.el-scrollbar) {
103-
height: 100%; // 确保高度占满容器
99+
flex: 1; // 确保高度占满容器
104100
min-height: 0; // 允许内容区域收缩
105101

106102
.el-scrollbar__wrap {
107103
overflow-x: hidden;
108-
height: 100%;
109104
}
110105

111106
.el-scrollbar__view {
112107
padding: v.$spacing-md;
113108
display: flex;
114109
flex-direction: column;
115110
gap: v.$spacing-xs;
111+
112+
button {
113+
margin-right: v.$spacing-xs; // 确保按钮右边有足够空间显示边框
114+
}
116115
}
117116
}
118117

0 commit comments

Comments
 (0)