dcp-design-react 1.11.18 → 1.11.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,375 +1,375 @@
1
- /*
2
- * @Author: 焦质晔
3
- * @Date: 2021-07-23 19:05:57
4
- * @Last Modified by: 焦质晔
5
- * @Last Modified time: 2024-07-24 10:41:26
6
- */
7
- @import '../../style/common';
8
-
9
- // 外层容器
10
- .@{prefix-table}--wrapper {
11
- .reset-container();
12
- }
13
-
14
- /* 全屏 */
15
- .@{prefix-table}--maximize {
16
- position: fixed;
17
- top: 0;
18
- left: 0;
19
- right: 0;
20
- height: 100%;
21
- z-index: 100;
22
- overflow-y: auto;
23
- padding: @v-module-distance;
24
- padding-bottom: 0;
25
- background-color: @v-table-background-color;
26
- }
27
-
28
- /* table 样式 */
29
- .@{prefix-table} {
30
- position: relative;
31
- background-color: @v-table-background-color;
32
- &:before,
33
- &:after {
34
- content: '';
35
- position: absolute;
36
- left: 0;
37
- width: 100%;
38
- height: 0;
39
- z-index: 3;
40
- pointer-events: none;
41
- }
42
- &:before {
43
- top: 0;
44
- border-top: 1px solid @v-table-border-color;
45
- }
46
- &:after {
47
- bottom: 0;
48
- border-bottom: 1px solid @v-table-border-color;
49
- }
50
-
51
- &--header,
52
- &--body,
53
- &--footer {
54
- border: 0;
55
- border-spacing: 0;
56
- border-collapse: separate;
57
- table-layout: fixed;
58
- }
59
-
60
- &--header-wrapper,
61
- &--footer-wrapper {
62
- overflow-x: hidden;
63
- overflow-y: hidden;
64
- }
65
-
66
- &--body-wrapper {
67
- overflow-y: auto;
68
- overflow-x: auto;
69
- .virtual-container {
70
- will-change: margin-top, margin-left;
71
- }
72
- }
73
-
74
- &.c--resize {
75
- cursor: col-resize;
76
- .header--column {
77
- pointer-events: none;
78
- }
79
- }
80
-
81
- .header--column {
82
- background-color: @v-table-header-background-color;
83
- }
84
-
85
- .body--column {
86
- transition: background-color 0.3s ease;
87
- background-color: @v-table-background-color;
88
- }
89
-
90
- .footer--column {
91
- background-color: @v-table-footer-background-color;
92
- border-bottom: 0;
93
- }
94
-
95
- .body--row:hover {
96
- .body--column {
97
- background-color: @v-table-row-hover-background-color;
98
- }
99
- }
100
-
101
- .body--row-striped {
102
- .body--column {
103
- background-color: @v-table-header-background-color;
104
- }
105
- }
106
-
107
- .body--row-selected {
108
- .body--column {
109
- background-color: @v-table-row-selected-background-color;
110
- }
111
- }
112
-
113
- .body--row-current {
114
- .body--column {
115
- background-color: @v-table-row-current-background-color;
116
- }
117
- }
118
-
119
- .body--row-expanded {
120
- .body--column {
121
- background-color: @v-table-row-expanded-background-color;
122
- }
123
- }
124
-
125
- .body--row-group_1 {
126
- .body--column {
127
- background-color: @--primary-1;
128
- }
129
- }
130
-
131
- .body--row-group_2 {
132
- .body--column {
133
- background-color: @--primary-2;
134
- }
135
- }
136
-
137
- .body--row-group_3 {
138
- .body--column {
139
- background-color: @--primary-3;
140
- }
141
- }
142
-
143
- .header--column,
144
- .body--column,
145
- .footer--column {
146
- position: relative;
147
- text-align: left;
148
- // line-height: @v-table-row-line-height;
149
- /* 溢出列 */
150
- &.col--ellipsis {
151
- .cell {
152
- .text-overflow-cut();
153
- word-break: break-all;
154
- white-space: pre;
155
- }
156
- }
157
- &:not(.col--ellipsis) {
158
- padding: ceil(((@v-table-row-height - @v-table-row-line-height) / 2)) 0;
159
- .cell {
160
- line-height: 1.2;
161
- }
162
- }
163
- &.col--center:not(.header--column) {
164
- text-align: center;
165
- }
166
- &.col--right:not(.header--column) {
167
- text-align: right;
168
- }
169
- &.col-active {
170
- box-shadow: inset 0 0 0 2px @v-primary-color;
171
- background-color: @v-table-row-active-color !important;
172
- }
173
- .cell {
174
- white-space: pre-wrap;
175
- word-break: break-all;
176
- padding: 0 @v-module-distance;
177
- .cell--indent {
178
- float: left;
179
- height: 1px;
180
- visibility: hidden;
181
- }
182
- .cell--sign {
183
- content: ' ';
184
- top: -5px;
185
- left: -5px;
186
- position: absolute;
187
- z-index: 1;
188
- border-width: 5px;
189
- border-style: solid;
190
- border-color: transparent @v-primary-color transparent transparent;
191
- transform: rotate(45deg);
192
- pointer-events: none;
193
- }
194
- .is-cell-bg {
195
- position: relative;
196
- z-index: 1;
197
- }
198
- .cell--bg {
199
- position: absolute;
200
- top: 0;
201
- left: 0;
202
- width: 100%;
203
- height: 100%;
204
- z-index: 0;
205
- pointer-events: none;
206
- }
207
- .cell--copy {
208
- display: flex;
209
- flex-shrink: 0;
210
- align-items: center;
211
- justify-content: space-between;
212
- .text {
213
- flex: 1;
214
- .text-overflow-cut();
215
- }
216
- .icon {
217
- margin-right: -2px;
218
- color: @v-font-color-placeholder;
219
- cursor: pointer;
220
- }
221
- }
222
- }
223
- }
224
-
225
- // 自定义
226
- &.is--fixed {
227
- .cell-fix-left,
228
- .cell-fix-right {
229
- position: sticky;
230
- z-index: 2;
231
- }
232
- .cell-fix-left-last {
233
- &::after {
234
- content: '';
235
- position: absolute;
236
- top: 0;
237
- right: 0;
238
- bottom: -1px;
239
- width: 20px;
240
- transform: translateX(100%);
241
- transition: box-shadow 0.3s, -webkit-box-shadow 0.3s;
242
- pointer-events: none;
243
- }
244
- }
245
- .cell-fix-right-first {
246
- &::after {
247
- content: '';
248
- position: absolute;
249
- top: 0;
250
- left: 0;
251
- bottom: -1px;
252
- width: 20px;
253
- transform: translateX(-100%);
254
- transition: box-shadow 0.3s, -webkit-box-shadow 0.3s;
255
- pointer-events: none;
256
- }
257
- }
258
- &.is--ping-left .cell-fix-left-last::after {
259
- box-shadow: inset 10px 0 8px -8px rgba(0, 0, 0, 0.15);
260
- }
261
- &.is--ping-right .cell-fix-right-first::after {
262
- box-shadow: inset -10px 0 8px -8px rgba(0, 0, 0, 0.15);
263
- }
264
- }
265
-
266
- &.is--sortable {
267
- .column-has-sorter {
268
- transition: background-color 0.3s ease;
269
- cursor: pointer;
270
- &:hover {
271
- background-color: @v-table-column-sort-hover-color;
272
- }
273
- &.column--sort {
274
- background-color: @v-table-column-sorted-color;
275
- }
276
- }
277
- .column--sort {
278
- background-color: @v-table-header-background-color;
279
- }
280
- }
281
-
282
- &.is--border {
283
- .header--column,
284
- .body--column,
285
- .footer--column {
286
- border-bottom: 1px solid @v-table-border-color;
287
- border-inline-end: 1px solid @v-table-border-color;
288
- // box-shadow: inset -1px -1px 0 @v-table-border-color;
289
- .box-sizing-content();
290
- }
291
- }
292
-
293
- &:not(.is--border) {
294
- &:before,
295
- &:after {
296
- border: 0;
297
- }
298
- .header--column,
299
- .body--column {
300
- border-bottom: 1px solid @v-table-border-color;
301
- // box-shadow: inset 0 -1px 0 @v-table-border-color;
302
- }
303
- }
304
-
305
- &.is--area-select &--body-wrapper {
306
- & > div {
307
- position: relative;
308
- }
309
- table td {
310
- user-select: none;
311
- }
312
- }
313
-
314
- /* body 填充元素 */
315
- .body--x-space {
316
- height: 0;
317
- visibility: hidden;
318
- &::after {
319
- content: '.';
320
- }
321
- }
322
- .body--y-space {
323
- width: 0;
324
- line-height: 0;
325
- float: left;
326
- visibility: hidden;
327
- &::after {
328
- content: '.';
329
- }
330
- }
331
-
332
- /* 列宽线 */
333
- &--resizable-bar {
334
- display: none;
335
- position: absolute;
336
- top: 0;
337
- left: 0;
338
- width: 1px;
339
- height: 100%;
340
- z-index: 4;
341
- &:before {
342
- content: '';
343
- display: block;
344
- height: 100%;
345
- background-color: @v-table-resizable-color;
346
- }
347
- }
348
-
349
- /* 边框线 */
350
- &--border-line {
351
- &:before,
352
- &:after {
353
- content: '';
354
- position: absolute;
355
- top: 0;
356
- width: 0;
357
- height: 100%;
358
- z-index: 3;
359
- pointer-events: none;
360
- }
361
- &:before {
362
- left: 0;
363
- border-left: 1px solid @v-table-border-color;
364
- }
365
- &:after {
366
- right: 0;
367
- border-right: 1px solid @v-table-border-color;
368
- }
369
- }
370
-
371
- /* 弹出层 */
372
- &__popper {
373
- padding: @v-module-distance;
374
- }
375
- }
1
+ /*
2
+ * @Author: 焦质晔
3
+ * @Date: 2021-07-23 19:05:57
4
+ * @Last Modified by: 焦质晔
5
+ * @Last Modified time: 2024-07-24 10:41:26
6
+ */
7
+ @import '../../style/common';
8
+
9
+ // 外层容器
10
+ .@{prefix-table}--wrapper {
11
+ .reset-container();
12
+ }
13
+
14
+ /* 全屏 */
15
+ .@{prefix-table}--maximize {
16
+ position: fixed;
17
+ top: 0;
18
+ left: 0;
19
+ right: 0;
20
+ height: 100%;
21
+ z-index: 100;
22
+ overflow-y: auto;
23
+ padding: @v-module-distance;
24
+ padding-bottom: 0;
25
+ background-color: @v-table-background-color;
26
+ }
27
+
28
+ /* table 样式 */
29
+ .@{prefix-table} {
30
+ position: relative;
31
+ background-color: @v-table-background-color;
32
+ &:before,
33
+ &:after {
34
+ content: '';
35
+ position: absolute;
36
+ left: 0;
37
+ width: 100%;
38
+ height: 0;
39
+ z-index: 3;
40
+ pointer-events: none;
41
+ }
42
+ &:before {
43
+ top: 0;
44
+ border-top: 1px solid @v-table-border-color;
45
+ }
46
+ &:after {
47
+ bottom: 0;
48
+ border-bottom: 1px solid @v-table-border-color;
49
+ }
50
+
51
+ &--header,
52
+ &--body,
53
+ &--footer {
54
+ border: 0;
55
+ border-spacing: 0;
56
+ border-collapse: separate;
57
+ table-layout: fixed;
58
+ }
59
+
60
+ &--header-wrapper,
61
+ &--footer-wrapper {
62
+ overflow-x: hidden;
63
+ overflow-y: hidden;
64
+ }
65
+
66
+ &--body-wrapper {
67
+ overflow-y: auto;
68
+ overflow-x: auto;
69
+ .virtual-container {
70
+ will-change: margin-top, margin-left;
71
+ }
72
+ }
73
+
74
+ &.c--resize {
75
+ cursor: col-resize;
76
+ .header--column {
77
+ pointer-events: none;
78
+ }
79
+ }
80
+
81
+ .header--column {
82
+ background-color: @v-table-header-background-color;
83
+ }
84
+
85
+ .body--column {
86
+ transition: background-color 0.3s ease;
87
+ background-color: @v-table-background-color;
88
+ }
89
+
90
+ .footer--column {
91
+ background-color: @v-table-footer-background-color;
92
+ border-bottom: 0;
93
+ }
94
+
95
+ .body--row:hover {
96
+ .body--column {
97
+ background-color: @v-table-row-hover-background-color;
98
+ }
99
+ }
100
+
101
+ .body--row-striped {
102
+ .body--column {
103
+ background-color: @v-table-header-background-color;
104
+ }
105
+ }
106
+
107
+ .body--row-selected {
108
+ .body--column {
109
+ background-color: @v-table-row-selected-background-color;
110
+ }
111
+ }
112
+
113
+ .body--row-current {
114
+ .body--column {
115
+ background-color: @v-table-row-current-background-color;
116
+ }
117
+ }
118
+
119
+ .body--row-expanded {
120
+ .body--column {
121
+ background-color: @v-table-row-expanded-background-color;
122
+ }
123
+ }
124
+
125
+ .body--row-group_1 {
126
+ .body--column {
127
+ background-color: @--primary-1;
128
+ }
129
+ }
130
+
131
+ .body--row-group_2 {
132
+ .body--column {
133
+ background-color: @--primary-2;
134
+ }
135
+ }
136
+
137
+ .body--row-group_3 {
138
+ .body--column {
139
+ background-color: @--primary-3;
140
+ }
141
+ }
142
+
143
+ .header--column,
144
+ .body--column,
145
+ .footer--column {
146
+ position: relative;
147
+ text-align: left;
148
+ // line-height: @v-table-row-line-height;
149
+ /* 溢出列 */
150
+ &.col--ellipsis {
151
+ .cell {
152
+ .text-overflow-cut();
153
+ word-break: break-all;
154
+ white-space: pre;
155
+ }
156
+ }
157
+ &:not(.col--ellipsis) {
158
+ padding: ceil(((@v-table-row-height - @v-table-row-line-height) / 2)) 0;
159
+ .cell {
160
+ line-height: 1.2;
161
+ }
162
+ }
163
+ &.col--center:not(.header--column) {
164
+ text-align: center;
165
+ }
166
+ &.col--right:not(.header--column) {
167
+ text-align: right;
168
+ }
169
+ &.col-active {
170
+ box-shadow: inset 0 0 0 2px @v-primary-color;
171
+ background-color: @v-table-row-active-color !important;
172
+ }
173
+ .cell {
174
+ white-space: pre-wrap;
175
+ word-break: break-all;
176
+ padding: 0 @v-module-distance;
177
+ .cell--indent {
178
+ float: left;
179
+ height: 1px;
180
+ visibility: hidden;
181
+ }
182
+ .cell--sign {
183
+ content: ' ';
184
+ top: -5px;
185
+ left: -5px;
186
+ position: absolute;
187
+ z-index: 1;
188
+ border-width: 5px;
189
+ border-style: solid;
190
+ border-color: transparent @v-primary-color transparent transparent;
191
+ transform: rotate(45deg);
192
+ pointer-events: none;
193
+ }
194
+ .is-cell-bg {
195
+ position: relative;
196
+ z-index: 1;
197
+ }
198
+ .cell--bg {
199
+ position: absolute;
200
+ top: 0;
201
+ left: 0;
202
+ width: 100%;
203
+ height: 100%;
204
+ z-index: 0;
205
+ pointer-events: none;
206
+ }
207
+ .cell--copy {
208
+ display: flex;
209
+ flex-shrink: 0;
210
+ align-items: center;
211
+ justify-content: space-between;
212
+ .text {
213
+ flex: 1;
214
+ .text-overflow-cut();
215
+ }
216
+ .icon {
217
+ margin-right: -2px;
218
+ color: @v-font-color-placeholder;
219
+ cursor: pointer;
220
+ }
221
+ }
222
+ }
223
+ }
224
+
225
+ // 自定义
226
+ &.is--fixed {
227
+ .cell-fix-left,
228
+ .cell-fix-right {
229
+ position: sticky;
230
+ z-index: 2;
231
+ }
232
+ .cell-fix-left-last {
233
+ &::after {
234
+ content: '';
235
+ position: absolute;
236
+ top: 0;
237
+ right: 0;
238
+ bottom: -1px;
239
+ width: 20px;
240
+ transform: translateX(100%);
241
+ transition: box-shadow 0.3s, -webkit-box-shadow 0.3s;
242
+ pointer-events: none;
243
+ }
244
+ }
245
+ .cell-fix-right-first {
246
+ &::after {
247
+ content: '';
248
+ position: absolute;
249
+ top: 0;
250
+ left: 0;
251
+ bottom: -1px;
252
+ width: 20px;
253
+ transform: translateX(-100%);
254
+ transition: box-shadow 0.3s, -webkit-box-shadow 0.3s;
255
+ pointer-events: none;
256
+ }
257
+ }
258
+ &.is--ping-left .cell-fix-left-last::after {
259
+ box-shadow: inset 10px 0 8px -8px rgba(0, 0, 0, 0.15);
260
+ }
261
+ &.is--ping-right .cell-fix-right-first::after {
262
+ box-shadow: inset -10px 0 8px -8px rgba(0, 0, 0, 0.15);
263
+ }
264
+ }
265
+
266
+ &.is--sortable {
267
+ .column-has-sorter {
268
+ transition: background-color 0.3s ease;
269
+ cursor: pointer;
270
+ &:hover {
271
+ background-color: @v-table-column-sort-hover-color;
272
+ }
273
+ &.column--sort {
274
+ background-color: @v-table-column-sorted-color;
275
+ }
276
+ }
277
+ .column--sort {
278
+ background-color: @v-table-header-background-color;
279
+ }
280
+ }
281
+
282
+ &.is--border {
283
+ .header--column,
284
+ .body--column,
285
+ .footer--column {
286
+ border-bottom: 1px solid @v-table-border-color;
287
+ border-inline-end: 1px solid @v-table-border-color;
288
+ // box-shadow: inset -1px -1px 0 @v-table-border-color;
289
+ .box-sizing-content();
290
+ }
291
+ }
292
+
293
+ &:not(.is--border) {
294
+ &:before,
295
+ &:after {
296
+ border: 0;
297
+ }
298
+ .header--column,
299
+ .body--column {
300
+ border-bottom: 1px solid @v-table-border-color;
301
+ // box-shadow: inset 0 -1px 0 @v-table-border-color;
302
+ }
303
+ }
304
+
305
+ &.is--area-select &--body-wrapper {
306
+ & > div {
307
+ position: relative;
308
+ }
309
+ table td {
310
+ user-select: none;
311
+ }
312
+ }
313
+
314
+ /* body 填充元素 */
315
+ .body--x-space {
316
+ height: 0;
317
+ visibility: hidden;
318
+ &::after {
319
+ content: '.';
320
+ }
321
+ }
322
+ .body--y-space {
323
+ width: 0;
324
+ line-height: 0;
325
+ float: left;
326
+ visibility: hidden;
327
+ &::after {
328
+ content: '.';
329
+ }
330
+ }
331
+
332
+ /* 列宽线 */
333
+ &--resizable-bar {
334
+ display: none;
335
+ position: absolute;
336
+ top: 0;
337
+ left: 0;
338
+ width: 1px;
339
+ height: 100%;
340
+ z-index: 4;
341
+ &:before {
342
+ content: '';
343
+ display: block;
344
+ height: 100%;
345
+ background-color: @v-table-resizable-color;
346
+ }
347
+ }
348
+
349
+ /* 边框线 */
350
+ &--border-line {
351
+ &:before,
352
+ &:after {
353
+ content: '';
354
+ position: absolute;
355
+ top: 0;
356
+ width: 0;
357
+ height: 100%;
358
+ z-index: 3;
359
+ pointer-events: none;
360
+ }
361
+ &:before {
362
+ left: 0;
363
+ border-left: 1px solid @v-table-border-color;
364
+ }
365
+ &:after {
366
+ right: 0;
367
+ border-right: 1px solid @v-table-border-color;
368
+ }
369
+ }
370
+
371
+ /* 弹出层 */
372
+ &__popper {
373
+ padding: @v-module-distance;
374
+ }
375
+ }