dcp-design-react 1.9.21 → 1.9.23

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,372 +1,360 @@
1
- /*
2
- * @Author: 焦质晔
3
- * @Date: 2021-07-23 19:05:57
4
- * @Last Modified by: 焦质晔
5
- * @Last Modified time: 2024-07-02 09:33:48
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
- }
70
-
71
- &--merge-cell {
72
- position: absolute;
73
- display: none;
74
- border: 2px solid @v-primary-color;
75
- border-radius: @v-border-radius;
76
- background-color: rgba(255, 255, 255, 0.3);
77
- z-index: 9;
78
- .btn {
79
- position: absolute;
80
- right: -54px;
81
- bottom: 0;
82
- }
83
- .cancel {
84
- bottom: 30px;
85
- }
86
- }
87
-
88
- &.c--resize {
89
- cursor: col-resize;
90
- .header--column {
91
- pointer-events: none;
92
- }
93
- }
94
-
95
- .header--column {
96
- background-color: @v-table-header-background-color;
97
- }
98
-
99
- .body--column {
100
- transition: background-color 0.3s ease;
101
- background-color: @v-table-background-color;
102
- }
103
-
104
- .footer--column {
105
- background-color: @v-table-footer-background-color;
106
- border-bottom: 0;
107
- }
108
-
109
- .body--row:hover {
110
- .body--column {
111
- background-color: @v-table-row-hover-background-color;
112
- }
113
- }
114
-
115
- .body--row-striped {
116
- .body--column {
117
- background-color: @v-table-header-background-color;
118
- }
119
- }
120
-
121
- .body--row-selected {
122
- .body--column {
123
- background-color: @v-table-row-selected-background-color;
124
- }
125
- }
126
-
127
- .body--row-current {
128
- .body--column {
129
- background-color: @v-table-row-current-background-color;
130
- }
131
- }
132
-
133
- .body--row-expanded {
134
- .body--column {
135
- background-color: @v-table-row-expanded-background-color;
136
- }
137
- }
138
-
139
- .body--row-group_1 {
140
- .body--column {
141
- background-color: @--primary-1;
142
- }
143
- }
144
-
145
- .body--row-group_2 {
146
- .body--column {
147
- background-color: @--primary-2;
148
- }
149
- }
150
-
151
- .body--row-group_3 {
152
- .body--column {
153
- background-color: @--primary-3;
154
- }
155
- }
156
-
157
- .header--column,
158
- .body--column,
159
- .footer--column {
160
- position: relative;
161
- text-align: left;
162
- // line-height: @v-table-row-line-height;
163
- &:not(.col--ellipsis) {
164
- padding: ceil(((@v-table-row-height - @v-table-row-line-height) / 2)) 0;
165
- .cell {
166
- line-height: 1.2;
167
- }
168
- }
169
- &.col--center:not(.header--column) {
170
- text-align: center;
171
- }
172
- &.col--right:not(.header--column) {
173
- text-align: right;
174
- }
175
- .cell {
176
- white-space: pre-wrap;
177
- word-break: break-all;
178
- padding: 0 @v-module-distance;
179
- .cell--indent {
180
- float: left;
181
- height: 1px;
182
- visibility: hidden;
183
- }
184
- .cell--sign {
185
- content: ' ';
186
- top: -5px;
187
- left: -5px;
188
- position: absolute;
189
- z-index: 1;
190
- border-width: 5px;
191
- border-style: solid;
192
- border-color: transparent @v-primary-color transparent transparent;
193
- transform: rotate(45deg);
194
- pointer-events: none;
195
- }
196
- .cell--copy {
197
- display: flex;
198
- flex-shrink: 0;
199
- align-items: center;
200
- justify-content: space-between;
201
- .text {
202
- flex: 1;
203
- .text-overflow-cut();
204
- }
205
- .icon {
206
- margin-right: -2px;
207
- color: @v-font-secondary-color;
208
- cursor: pointer;
209
- }
210
- }
211
- }
212
- }
213
-
214
- // 自定义
215
- &.is--fixed {
216
- .cell-fix-left,
217
- .cell-fix-right {
218
- position: sticky;
219
- z-index: 2;
220
- }
221
- .cell-fix-left-last {
222
- &::after {
223
- content: '';
224
- position: absolute;
225
- top: 0;
226
- right: 0;
227
- bottom: -1px;
228
- width: 20px;
229
- transform: translateX(100%);
230
- transition: box-shadow 0.3s, -webkit-box-shadow 0.3s;
231
- pointer-events: none;
232
- }
233
- }
234
- .cell-fix-right-first {
235
- &::after {
236
- content: '';
237
- position: absolute;
238
- top: 0;
239
- left: 0;
240
- bottom: -1px;
241
- width: 20px;
242
- transform: translateX(-100%);
243
- transition: box-shadow 0.3s, -webkit-box-shadow 0.3s;
244
- pointer-events: none;
245
- }
246
- }
247
- &.is--ping-left .cell-fix-left-last::after {
248
- box-shadow: inset 10px 0 8px -8px rgba(0, 0, 0, 0.15);
249
- }
250
- &.is--ping-right .cell-fix-right-first::after {
251
- box-shadow: inset -10px 0 8px -8px rgba(0, 0, 0, 0.15);
252
- }
253
- }
254
-
255
- &.is--sortable {
256
- .column-has-sorter {
257
- transition: background-color 0.3s ease;
258
- cursor: pointer;
259
- &:hover {
260
- background-color: @v-table-column-sort-hover-color;
261
- }
262
- &.column--sort {
263
- background-color: @v-table-column-sorted-color;
264
- }
265
- }
266
- .column--sort {
267
- background-color: @v-table-header-background-color;
268
- }
269
- }
270
-
271
- &.is--border {
272
- .header--column,
273
- .body--column,
274
- .footer--column {
275
- border-bottom: 1px solid @v-table-border-color;
276
- border-inline-end: 1px solid @v-table-border-color;
277
- // box-shadow: inset -1px -1px 0 @v-table-border-color;
278
- .box-sizing-content();
279
- }
280
- }
281
-
282
- &:not(.is--border) {
283
- &:before,
284
- &:after {
285
- border: 0;
286
- }
287
- .header--column,
288
- .body--column {
289
- border-bottom: 1px solid @v-table-border-color;
290
- // box-shadow: inset 0 -1px 0 @v-table-border-color;
291
- }
292
- }
293
-
294
- &.is--merge-cell &--body-wrapper > table > tbody {
295
- pointer-events: none;
296
- }
297
-
298
- /* body 填充元素 */
299
- .body--x-space {
300
- height: 0;
301
- visibility: hidden;
302
- &::after {
303
- content: '.';
304
- }
305
- }
306
- .body--y-space {
307
- width: 0;
308
- line-height: 0;
309
- float: left;
310
- visibility: hidden;
311
- &::after {
312
- content: '.';
313
- }
314
- }
315
-
316
- /* 列宽线 */
317
- &--resizable-bar {
318
- display: none;
319
- position: absolute;
320
- top: 0;
321
- left: 0;
322
- width: 1px;
323
- height: 100%;
324
- z-index: 4;
325
- &:before {
326
- content: '';
327
- display: block;
328
- height: 100%;
329
- background-color: @v-table-resizable-color;
330
- }
331
- }
332
-
333
- /* 边框线 */
334
- &--border-line {
335
- &:before,
336
- &:after {
337
- content: '';
338
- position: absolute;
339
- top: 0;
340
- width: 0;
341
- height: 100%;
342
- z-index: 3;
343
- pointer-events: none;
344
- }
345
- &:before {
346
- left: 0;
347
- border-left: 1px solid @v-table-border-color;
348
- }
349
- &:after {
350
- right: 0;
351
- border-right: 1px solid @v-table-border-color;
352
- }
353
- }
354
-
355
- /* 溢出列 */
356
- .header--column,
357
- .body--column,
358
- .footer--column {
359
- &.col--ellipsis {
360
- .cell {
361
- .text-overflow-cut();
362
- word-break: break-all;
363
- white-space: pre;
364
- }
365
- }
366
- }
367
-
368
- /* 弹出层 */
369
- &__popper {
370
- padding: @v-module-distance;
371
- }
372
- }
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
+ }
70
+
71
+ &.c--resize {
72
+ cursor: col-resize;
73
+ .header--column {
74
+ pointer-events: none;
75
+ }
76
+ }
77
+
78
+ .header--column {
79
+ background-color: @v-table-header-background-color;
80
+ }
81
+
82
+ .body--column {
83
+ transition: background-color 0.3s ease;
84
+ background-color: @v-table-background-color;
85
+ }
86
+
87
+ .footer--column {
88
+ background-color: @v-table-footer-background-color;
89
+ border-bottom: 0;
90
+ }
91
+
92
+ .body--row:hover {
93
+ .body--column {
94
+ background-color: @v-table-row-hover-background-color;
95
+ }
96
+ }
97
+
98
+ .body--row-striped {
99
+ .body--column {
100
+ background-color: @v-table-header-background-color;
101
+ }
102
+ }
103
+
104
+ .body--row-selected {
105
+ .body--column {
106
+ background-color: @v-table-row-selected-background-color;
107
+ }
108
+ }
109
+
110
+ .body--row-current {
111
+ .body--column {
112
+ background-color: @v-table-row-current-background-color;
113
+ }
114
+ }
115
+
116
+ .body--row-expanded {
117
+ .body--column {
118
+ background-color: @v-table-row-expanded-background-color;
119
+ }
120
+ }
121
+
122
+ .body--row-group_1 {
123
+ .body--column {
124
+ background-color: @--primary-1;
125
+ }
126
+ }
127
+
128
+ .body--row-group_2 {
129
+ .body--column {
130
+ background-color: @--primary-2;
131
+ }
132
+ }
133
+
134
+ .body--row-group_3 {
135
+ .body--column {
136
+ background-color: @--primary-3;
137
+ }
138
+ }
139
+
140
+ .header--column,
141
+ .body--column,
142
+ .footer--column {
143
+ position: relative;
144
+ text-align: left;
145
+ // line-height: @v-table-row-line-height;
146
+ &:not(.col--ellipsis) {
147
+ padding: ceil(((@v-table-row-height - @v-table-row-line-height) / 2)) 0;
148
+ .cell {
149
+ line-height: 1.2;
150
+ }
151
+ }
152
+ &.col--center:not(.header--column) {
153
+ text-align: center;
154
+ }
155
+ &.col--right:not(.header--column) {
156
+ text-align: right;
157
+ }
158
+ .cell {
159
+ white-space: pre-wrap;
160
+ word-break: break-all;
161
+ padding: 0 @v-module-distance;
162
+ .cell--indent {
163
+ float: left;
164
+ height: 1px;
165
+ visibility: hidden;
166
+ }
167
+ .cell--sign {
168
+ content: ' ';
169
+ top: -5px;
170
+ left: -5px;
171
+ position: absolute;
172
+ z-index: 1;
173
+ border-width: 5px;
174
+ border-style: solid;
175
+ border-color: transparent @v-primary-color transparent transparent;
176
+ transform: rotate(45deg);
177
+ pointer-events: none;
178
+ }
179
+ .cell--copy {
180
+ display: flex;
181
+ flex-shrink: 0;
182
+ align-items: center;
183
+ justify-content: space-between;
184
+ .text {
185
+ flex: 1;
186
+ .text-overflow-cut();
187
+ }
188
+ .icon {
189
+ margin-right: -2px;
190
+ color: @v-font-secondary-color;
191
+ cursor: pointer;
192
+ }
193
+ }
194
+ }
195
+ }
196
+
197
+ // 自定义
198
+ &.is--fixed {
199
+ .cell-fix-left,
200
+ .cell-fix-right {
201
+ position: sticky;
202
+ z-index: 2;
203
+ }
204
+ .cell-fix-left-last {
205
+ &::after {
206
+ content: '';
207
+ position: absolute;
208
+ top: 0;
209
+ right: 0;
210
+ bottom: -1px;
211
+ width: 20px;
212
+ transform: translateX(100%);
213
+ transition: box-shadow 0.3s, -webkit-box-shadow 0.3s;
214
+ pointer-events: none;
215
+ }
216
+ }
217
+ .cell-fix-right-first {
218
+ &::after {
219
+ content: '';
220
+ position: absolute;
221
+ top: 0;
222
+ left: 0;
223
+ bottom: -1px;
224
+ width: 20px;
225
+ transform: translateX(-100%);
226
+ transition: box-shadow 0.3s, -webkit-box-shadow 0.3s;
227
+ pointer-events: none;
228
+ }
229
+ }
230
+ &.is--ping-left .cell-fix-left-last::after {
231
+ box-shadow: inset 10px 0 8px -8px rgba(0, 0, 0, 0.15);
232
+ }
233
+ &.is--ping-right .cell-fix-right-first::after {
234
+ box-shadow: inset -10px 0 8px -8px rgba(0, 0, 0, 0.15);
235
+ }
236
+ }
237
+
238
+ &.is--sortable {
239
+ .column-has-sorter {
240
+ transition: background-color 0.3s ease;
241
+ cursor: pointer;
242
+ &:hover {
243
+ background-color: @v-table-column-sort-hover-color;
244
+ }
245
+ &.column--sort {
246
+ background-color: @v-table-column-sorted-color;
247
+ }
248
+ }
249
+ .column--sort {
250
+ background-color: @v-table-header-background-color;
251
+ }
252
+ }
253
+
254
+ &.is--border {
255
+ .header--column,
256
+ .body--column,
257
+ .footer--column {
258
+ border-bottom: 1px solid @v-table-border-color;
259
+ border-inline-end: 1px solid @v-table-border-color;
260
+ // box-shadow: inset -1px -1px 0 @v-table-border-color;
261
+ .box-sizing-content();
262
+ }
263
+ }
264
+
265
+ &:not(.is--border) {
266
+ &:before,
267
+ &:after {
268
+ border: 0;
269
+ }
270
+ .header--column,
271
+ .body--column {
272
+ border-bottom: 1px solid @v-table-border-color;
273
+ // box-shadow: inset 0 -1px 0 @v-table-border-color;
274
+ }
275
+ }
276
+
277
+ &.is--area-select &--body-wrapper {
278
+ & > div {
279
+ position: relative;
280
+ }
281
+ table td {
282
+ user-select: none;
283
+ }
284
+ }
285
+
286
+ /* body 填充元素 */
287
+ .body--x-space {
288
+ height: 0;
289
+ visibility: hidden;
290
+ &::after {
291
+ content: '.';
292
+ }
293
+ }
294
+ .body--y-space {
295
+ width: 0;
296
+ line-height: 0;
297
+ float: left;
298
+ visibility: hidden;
299
+ &::after {
300
+ content: '.';
301
+ }
302
+ }
303
+
304
+ /* 列宽线 */
305
+ &--resizable-bar {
306
+ display: none;
307
+ position: absolute;
308
+ top: 0;
309
+ left: 0;
310
+ width: 1px;
311
+ height: 100%;
312
+ z-index: 4;
313
+ &:before {
314
+ content: '';
315
+ display: block;
316
+ height: 100%;
317
+ background-color: @v-table-resizable-color;
318
+ }
319
+ }
320
+
321
+ /* 边框线 */
322
+ &--border-line {
323
+ &:before,
324
+ &:after {
325
+ content: '';
326
+ position: absolute;
327
+ top: 0;
328
+ width: 0;
329
+ height: 100%;
330
+ z-index: 3;
331
+ pointer-events: none;
332
+ }
333
+ &:before {
334
+ left: 0;
335
+ border-left: 1px solid @v-table-border-color;
336
+ }
337
+ &:after {
338
+ right: 0;
339
+ border-right: 1px solid @v-table-border-color;
340
+ }
341
+ }
342
+
343
+ /* 溢出列 */
344
+ .header--column,
345
+ .body--column,
346
+ .footer--column {
347
+ &.col--ellipsis {
348
+ .cell {
349
+ .text-overflow-cut();
350
+ word-break: break-all;
351
+ white-space: pre;
352
+ }
353
+ }
354
+ }
355
+
356
+ /* 弹出层 */
357
+ &__popper {
358
+ padding: @v-module-distance;
359
+ }
360
+ }