File tree Expand file tree Collapse file tree 1 file changed +57
-12
lines changed Expand file tree Collapse file tree 1 file changed +57
-12
lines changed Original file line number Diff line number Diff line change 14
14
15
15
& :not (.horizontal-layout ) {
16
16
.variables-section {
17
- // 竖直布局时使用自适应高度
18
- height : auto ;
19
- min-height : 120px ; // 设置最小高度
20
- max-height : 320px ; // 设置最大高度
17
+ width : 100% ;
18
+ max-width : 320px ;
19
+ display : flex ;
20
+ flex-direction : column ;
21
+ height : 320px ; // 设置固定高度
22
+ min-height : 120px ;
21
23
margin-bottom : v .$spacing-md ; // 添加底部间距
24
+
25
+ .variables-search {
26
+ flex : 0 0 auto ; // 搜索框固定高度
27
+ height : 48px ;
28
+ }
29
+
30
+ .variables {
31
+ flex : 1 1 auto ; // 让变量区域自动填充剩余空间
32
+ min-height : 0 ; // 关键:允许flex子项在需要时收缩
33
+ position : relative ;
34
+ overflow : hidden ;
35
+ display : flex ;
36
+ flex-direction : column ;
37
+
38
+ :deep (.el-scrollbar ) {
39
+ height : 100% ;
40
+ position : absolute ;
41
+ inset : 0 ;
42
+
43
+ .el-scrollbar__wrap {
44
+ height : 100% ;
45
+ overflow-x : hidden ;
46
+ }
47
+
48
+ .el-scrollbar__view {
49
+ padding : v .$spacing-md ;
50
+ display : flex ;
51
+ flex-direction : column ;
52
+ gap : v .$spacing-xs ;
53
+ }
54
+ }
55
+ }
22
56
}
23
57
24
58
:deep (.calculator ) {
102
136
padding-right : v .$spacing-xs ; // 添加右侧内边距
103
137
transition : all 0.3s ease ;
104
138
105
- @media (max-width : 768px ) {
139
+ .variables-search {
140
+ flex : 0 0 auto ;
141
+ height : 48px ;
106
142
width : 100% ;
107
- max-width : 320px ;
108
143
}
109
144
110
145
.variables {
146
+ flex : 1 1 auto ;
147
+ min-height : 0 ; // 允许内容收缩
111
148
position : relative ;
112
- flex : 1 ;
113
149
overflow : hidden ;
114
- display : flex ;
115
- flex-direction : column ;
116
150
117
151
:deep (.el-scrollbar ) {
118
- min-height : 80px ; // 设置最小高度
119
- height : auto ; // 自适应高度
120
- max-height : calc (100% - 48px ); // 减去搜索框高度
152
+ position : absolute ;
153
+ inset : 0 ;
154
+ height : 100% ;
155
+
156
+ .el-scrollbar__wrap {
157
+ height : 100% ;
158
+ }
159
+
160
+ .el-scrollbar__view {
161
+ padding : v .$spacing-md ;
162
+ display : flex ;
163
+ flex-direction : column ;
164
+ gap : v .$spacing-xs ;
165
+ }
121
166
}
122
167
}
123
168
}
You can’t perform that action at this time.
0 commit comments