forked from opentiny/tiny-vue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.less
232 lines (204 loc) · 4.73 KB
/
header.less
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
@import '../custom.less';
@grid-prefix-cls: ~'@{css-prefix}grid';
@grid-header-prefix-cls: ~'@{css-prefix}grid-header';
@grid-cell-prefix-cls: ~'@{css-prefix}grid-cell';
@grid-checkbox-prefix-cls: ~'@{css-prefix}grid-checkbox';
@header-suffix: ~'@{grid-prefix-cls}-cell__header-suffix';
@cell-tooltip: ~'@{grid-prefix-cls}-cell__tooltip';
.@{grid-prefix-cls}__header-wrapper {
@apply bg-color-fill-8;
.@{grid-prefix-cls}__repair {
@apply absolute;
@apply left-0;
@apply bottom-0;
@apply h-0;
@apply border-b border-b-color-border-separator;
}
}
.@{grid-header-prefix-cls}__column {
@apply relative;
@apply text-xs;
@apply text-color-text-primary;
&.is__sortable {
.@{grid-cell-prefix-cls} {
@apply pr-5;
}
}
// 在表格个性化场景,动态的设置冻结列,这里需要在非冻结列情况下消除之前设置的left和right样式,并提升权重覆盖style属性
&:not(.fixed__column) {
left: unset !important;
right: unset !important;
}
&.col__title-checked {
@apply bg-color-bg-2;
.@{grid-prefix-cls}-edit-icon {
&.@{grid-prefix-cls}-icon__edit-outline {
&:before {
@apply bg-color-bg-2;
}
}
}
}
&.col__ellipsis {
.@{grid-prefix-cls}-cell-text.is__sortable {
min-width: 23px;
}
.@{grid-prefix-cls}-edit-icon {
@apply static;
@apply translate-y-0;
@apply shrink-0;
}
}
.@{grid-prefix-cls}-required-icon {
@apply inline-block;
@apply text-color-error;
line-height: 14px;
@apply text-sm;
&:before {
@apply ~"content-['*']";
@apply ~'w-2.5';
@apply ~'h-2.5';
@apply block;
@apply text-left;
}
+ .@{grid-prefix-cls}-cell-text {
@apply w-auto;
}
}
.@{grid-prefix-cls}-cell-text {
@apply w-full;
line-height: 1.375rem;
}
.@{grid-prefix-cls}-edit-icon {
@apply mr-1;
order: -1;
@apply text-sm;
@apply fill-color-icon-disabled;
@apply shrink-0;
+ .@{grid-prefix-cls}-cell-text {
@apply w-auto;
}
}
.@{grid-prefix-cls}-thead-partition,
.@{grid-prefix-cls}-resizable {
@apply absolute;
@apply right-0;
@apply translate-x-1/2;
@apply bottom-0;
@apply top-0;
@apply m-auto;
@apply w-4;
@apply h-9;
@apply text-center;
// 因为与AUI冻结实现方式不一样,此处不要同步 @apply ~'z-[1]'
@apply select-none;
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
@apply m-0;
}
&.is__line {
&:before,
&:after {
@apply content-[''];
@apply block;
@apply align-middle;
@apply my-0 mx-auto;
}
&:before {
@apply w-px;
@apply h-3/5;
@apply bg-color-border-separator;
}
&:after {
@apply w-0;
@apply h-full;
}
}
}
.@{grid-prefix-cls}-resizable {
@apply cursor-col-resize;
@apply h-4;
&.is__line {
&:before {
@apply h-full;
}
}
}
&.is__multilevel {
.@{grid-prefix-cls}-resizable {
height: calc(100% - 16px);
}
}
.@{grid-checkbox-prefix-cls} {
> input {
&:not(:checked) {
& + .@{grid-checkbox-prefix-cls}__icon {
&:hover {
@apply border-color-border;
}
}
}
}
}
.@{grid-checkbox-prefix-cls}.is__indeterminate {
> input {
& + .@{grid-checkbox-prefix-cls}__icon {
&:hover {
@apply border-color-border-focus;
}
}
}
}
}
.@{grid-prefix-cls}__header {
.@{header-suffix} {
@apply relative;
min-height: 16px;
.suffix-icon-1 {
@apply absolute;
@apply right-3;
}
.suffix-icon-0 {
@apply absolute;
@apply right-0;
}
}
.col__ellipsis {
&.is__editable.is__sortable.is__filter {
.@{header-suffix}.@{cell-tooltip} {
@apply pr-7;
}
}
&.is__editable.is__sortable:not(.is__filter),
&.is__editable.is__filter:not(.is__sortable) {
.@{header-suffix}.@{cell-tooltip} {
@apply ~'pr-3.5';
}
}
&:not(.is__sortable):not(.is__filter) {
.@{header-suffix}.@{cell-tooltip} {
@apply pr-2;
}
}
&.is__sortable.is__filter:not(.is__editable) {
.@{header-suffix}.@{cell-tooltip} {
padding-right: 26px;
}
}
&.is__sortable:not(.is__filter):not(.is__editable),
&.is__filter:not(.is__sortable):not(.is__editable) {
.@{header-suffix}.@{cell-tooltip} {
@apply pr-3;
}
}
}
}
.@{grid-prefix-cls} {
th.col__selection > .@{grid-cell-prefix-cls} {
@apply relative;
& > .selection-dropdown-wrapper {
@apply absolute;
@apply right-0;
@apply top-0;
}
}
}