dcp-design-react 1.12.3 → 1.12.5

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,409 +1,501 @@
1
- /*
2
- * @Author: 焦质晔
3
- * @Date: 2022-03-16 19:05:30
4
- * @Last Modified by: 焦质晔
5
- * @Last Modified time: 2025-01-12 14:23:51
6
- */
7
- @import '../../style/common';
8
-
9
- .@{prefix-pivot-grid}__layout {
10
- .reset-container();
11
- width: 100%;
12
-
13
- // =========== 变量 ===========
14
- @header-bg-color: #d7f0ff;
15
- @border-radius: 8px;
16
- .bor-radius-left() {
17
- border-top-left-radius: @border-radius;
18
- border-bottom-left-radius: @border-radius;
19
- }
20
- .bor-radius-right() {
21
- border-top-right-radius: @border-radius;
22
- border-bottom-right-radius: @border-radius;
23
- }
24
- .bor-left-shadow() {
25
- box-shadow: -5px 0px 0 0px @--background-color-light;
26
- }
27
- .bor-right-shadow() {
28
- box-shadow: 5px 0px 0 0px @--background-color-light;
29
- }
30
- // =========== 变量 END ===========
31
-
32
- .@{qm-prefix}-scrollbar__wrap {
33
- // 调整为 flex 布局
34
- display: flex;
35
- flex-wrap: nowrap;
36
- & > div {
37
- height: fit-content;
38
- }
39
- }
40
- .header,
41
- .footer {
42
- display: flex;
43
- flex-direction: row;
44
- .fixed-left {
45
- position: sticky;
46
- left: 0;
47
- z-index: 1;
48
- display: flex;
49
- border-left: 1px solid @--border-color-secondary;
50
- border-bottom: 1px solid @--border-color-secondary;
51
- .bor-left-shadow();
52
- &,
53
- .table-cell:first-child {
54
- .bor-radius-left();
55
- }
56
- }
57
- .no-fixed {
58
- flex: 1 0;
59
- display: flex;
60
- border-bottom: 1px solid @--border-color-secondary;
61
- .bor-right-shadow();
62
- &,
63
- .table-cell:last-child {
64
- .bor-radius-right();
65
- }
66
- }
67
- }
68
- .header {
69
- position: sticky;
70
- top: 0;
71
- z-index: 2;
72
- .table-cell {
73
- position: relative;
74
- background-color: @header-bg-color !important;
75
- cursor: pointer;
76
- }
77
- .resize-bar {
78
- position: absolute;
79
- top: 0;
80
- bottom: 0;
81
- right: -3px;
82
- width: 6px;
83
- z-index: 2;
84
- cursor: col-resize;
85
- }
86
- }
87
- .body {
88
- display: flex;
89
- flex-direction: row;
90
- min-height: fit-content;
91
- }
92
- .footer {
93
- position: sticky;
94
- bottom: 0;
95
- z-index: 2;
96
- }
97
- .header,
98
- .body,
99
- .footer {
100
- .table-cell {
101
- align-self: stretch; // 子元素高度和父元素一致
102
- display: inline-flex;
103
- align-items: center;
104
- border-top: 1px solid @--border-color-secondary;
105
- border-right: 1px solid @--border-color-secondary;
106
- background-color: #fff;
107
- &.selection-column {
108
- justify-content: center;
109
- border-right-color: transparent;
110
- }
111
- .action {
112
- display: inline-flex;
113
- align-items: center;
114
- justify-content: center;
115
- .drag-icon,
116
- .expand-icon {
117
- display: inline-flex;
118
- align-items: center;
119
- justify-content: center;
120
- width: 20px;
121
- height: 20px;
122
- color: @--text-color-placeholder;
123
- visibility: hidden;
124
- }
125
- .expand-icon:hover {
126
- color: @--primary-color;
127
- }
128
- .middle {
129
- text-align: center;
130
- width: 16px;
131
- margin: 0 2px;
132
- .order {
133
- display: inline-block;
134
- }
135
- .checkbox {
136
- display: none;
137
- }
138
- }
139
- }
140
- &.col--center {
141
- text-align: center;
142
- justify-content: center;
143
- }
144
- &.col--right {
145
- text-align: right;
146
- justify-content: flex-end;
147
- }
148
- &.col--fix-left {
149
- position: sticky;
150
- z-index: 1;
151
- }
152
- &.col--checked {
153
- background-color: @--primary-1;
154
- }
155
- &.active {
156
- box-shadow: inset 0 0 0 2px @--primary-color;
157
- background-color: rgba(255, 235, 140, 1);
158
- }
159
- .cell {
160
- .text-overflow-cut();
161
- padding: 0 @--padding-sm;
162
- }
163
- }
164
- .label-cell,
165
- .table-cell {
166
- &:hover {
167
- .count-select {
168
- visibility: visible;
169
- }
170
- }
171
- }
172
- .count-select {
173
- .text-overflow-cut();
174
- display: inline-flex;
175
- align-items: center;
176
- justify-content: flex-end;
177
- height: 100%;
178
- width: 100%;
179
- padding: 0 @--padding-sm;
180
- color: @--text-color-placeholder;
181
- cursor: pointer;
182
- visibility: hidden;
183
- &:hover,
184
- &.ant-dropdown-open {
185
- visibility: visible;
186
- background-color: @--background-color-light;
187
- }
188
- &.show {
189
- visibility: visible;
190
- }
191
- .icon {
192
- margin-left: 4px;
193
- }
194
- }
195
- }
196
- .resize-line {
197
- position: absolute;
198
- left: -2px;
199
- top: 0;
200
- width: 2px;
201
- height: 100%;
202
- background-color: @--primary-color;
203
- cursor: col-resize;
204
- z-index: 2;
205
- }
206
- .fixed-line {
207
- position: absolute;
208
- left: -1px;
209
- top: 0;
210
- width: 0;
211
- height: 100%;
212
- border-left: 1px solid @--primary-3;
213
- z-index: 2;
214
- pointer-events: none;
215
- &::after {
216
- content: '';
217
- position: absolute;
218
- top: 0;
219
- right: 0;
220
- bottom: -1px;
221
- width: 20px;
222
- transform: translateX(100%);
223
- transition: box-shadow 0.3s, -webkit-box-shadow 0.3s;
224
- pointer-events: none;
225
- }
226
- &.active {
227
- &::after {
228
- box-shadow: inset 10px 0 8px -8px rgba(0, 0, 0, 0.15);
229
- }
230
- }
231
- }
232
- // 左侧面板
233
- .left-panel {
234
- position: sticky;
235
- left: 0;
236
- z-index: 1;
237
- .group-label {
238
- border-right: 0 !important;
239
- .bor-radius-left();
240
- &.level0 {
241
- .bor-left-shadow();
242
- }
243
- }
244
- .row-item {
245
- &:nth-of-type(1) {
246
- border-top-left-radius: @border-radius;
247
- .bor-left-shadow();
248
- .table-cell:first-child {
249
- border-top-left-radius: @border-radius;
250
- }
251
- }
252
- &.last {
253
- border-bottom-left-radius: @border-radius;
254
- .table-cell:first-child {
255
- border-bottom-left-radius: @border-radius;
256
- }
257
- }
258
- }
259
- .no-group {
260
- .row-item:last-child {
261
- .bor-left-shadow();
262
- }
263
- }
264
- }
265
- .main-panel {
266
- flex: 1 0;
267
- z-index: 0;
268
- .group-label,
269
- .row-item {
270
- border-left: 0 !important;
271
- }
272
- .group-label {
273
- .bor-radius-right();
274
- }
275
- .row-item {
276
- &:nth-of-type(1) {
277
- border-top-right-radius: @border-radius;
278
- .table-cell:last-child {
279
- border-top-right-radius: @border-radius;
280
- }
281
- }
282
- &.last {
283
- border-bottom-right-radius: @border-radius;
284
- .table-cell:last-child {
285
- border-bottom-right-radius: @border-radius;
286
- }
287
- }
288
- }
289
- }
290
- .container {
291
- position: relative;
292
- left: 0;
293
- top: 0;
294
- .group-label {
295
- position: absolute;
296
- border: 1px solid @--border-color-secondary;
297
- background-color: #fff;
298
- .label-row {
299
- display: flex;
300
- align-items: center;
301
- }
302
- .label-cell {
303
- align-self: stretch;
304
- display: inline-flex;
305
- align-items: center;
306
- &.expandable-column {
307
- justify-content: center;
308
- .button-icon {
309
- & > .anticon {
310
- transition: transform 0.3s ease;
311
- }
312
- &.expand > .anticon {
313
- transform: rotate(90deg);
314
- }
315
- }
316
- }
317
- &.col--fix-left {
318
- position: sticky;
319
- z-index: 1;
320
- }
321
- .title {
322
- flex-shrink: 0;
323
- margin-right: 20px;
324
- font-weight: 600;
325
- .empty {
326
- color: @--text-color-placeholder;
327
- font-weight: 400;
328
- }
329
- }
330
- }
331
- }
332
- .row-item {
333
- position: absolute;
334
- border-left: 1px solid @--border-color-secondary;
335
- &.last {
336
- .table-cell {
337
- border-bottom: 1px solid @--border-color-secondary;
338
- }
339
- }
340
- .table-row {
341
- display: flex;
342
- align-items: center;
343
- height: inherit;
344
- &.row--hover,
345
- &.row--selection {
346
- .table-cell {
347
- background-color: @--background-color-light;
348
- .middle&:has(.checkbox) {
349
- .order {
350
- display: none;
351
- }
352
- .checkbox {
353
- display: inline-flex;
354
- }
355
- }
356
- }
357
- }
358
- &.row--highlight {
359
- .table-cell {
360
- background-color: @--primary-1;
361
- }
362
- }
363
- &.row--hover {
364
- .table-cell {
365
- .drag-icon,
366
- .expand-icon {
367
- visibility: visible;
368
- }
369
- }
370
- }
371
- .cell--expand {
372
- display: inline-flex;
373
- padding: 4px;
374
- font-size: 13px;
375
- color: @--text-color-placeholder;
376
- cursor: pointer;
377
- transform: scaleX(1.15);
378
- transition: transform 0.3s ease;
379
- &.fold {
380
- transform: rotate(-90deg);
381
- }
382
- &.disabled {
383
- color: @--disabled-color;
384
- cursor: not-allowed;
385
- }
386
- }
387
- }
388
- }
389
- }
390
- // size
391
- &.small {
392
- .label-row,
393
- .table-cell {
394
- height: 26px;
395
- }
396
- }
397
- &.middle {
398
- .label-row,
399
- .table-cell {
400
- height: 34px;
401
- }
402
- }
403
- &.large {
404
- .label-row,
405
- .table-cell {
406
- height: 42px;
407
- }
408
- }
409
- }
1
+ /*
2
+ * @Author: 焦质晔
3
+ * @Date: 2022-03-16 19:05:30
4
+ * @Last Modified by: 焦质晔
5
+ * @Last Modified time: 2025-01-12 14:23:51
6
+ */
7
+ @import '../../style/common';
8
+
9
+ .@{prefix-pivot-grid}__layout {
10
+ .reset-container();
11
+ width: 100%;
12
+
13
+ &.col-resize {
14
+ cursor: col-resize;
15
+ .qm-scrollbar__view {
16
+ pointer-events: none;
17
+ }
18
+ }
19
+
20
+ // =========== 变量 ===========
21
+ @header-bg-color: #d7f0ff;
22
+ @border-radius: 8px;
23
+ .bor-radius-left() {
24
+ border-top-left-radius: @border-radius;
25
+ border-bottom-left-radius: @border-radius;
26
+ }
27
+ .bor-radius-right() {
28
+ border-top-right-radius: @border-radius;
29
+ border-bottom-right-radius: @border-radius;
30
+ }
31
+ .bor-left-shadow() {
32
+ box-shadow: -5px 0px 0 0px @--background-color-light;
33
+ }
34
+ .bor-right-shadow() {
35
+ box-shadow: 5px 0px 0 0px @--background-color-light;
36
+ }
37
+ // =========== 变量 END ===========
38
+
39
+ .@{qm-prefix}-scrollbar__wrap {
40
+ // 调整为 flex 布局
41
+ display: flex;
42
+ flex-wrap: nowrap;
43
+ & > div {
44
+ height: fit-content;
45
+ }
46
+ }
47
+ .header,
48
+ .footer {
49
+ display: flex;
50
+ flex-direction: row;
51
+ .fixed-left {
52
+ position: sticky;
53
+ left: 0;
54
+ z-index: 1;
55
+ display: flex;
56
+ border-left: 1px solid @--border-color-secondary;
57
+ border-bottom: 1px solid @--border-color-secondary;
58
+ .bor-left-shadow();
59
+ &,
60
+ .table-cell:first-child {
61
+ .bor-radius-left();
62
+ }
63
+ }
64
+ .no-fixed {
65
+ flex: 1 0;
66
+ display: flex;
67
+ border-bottom: 1px solid @--border-color-secondary;
68
+ .bor-right-shadow();
69
+ &,
70
+ .table-cell:last-child {
71
+ .bor-radius-right();
72
+ }
73
+ }
74
+ }
75
+ .header {
76
+ position: sticky;
77
+ top: 0;
78
+ z-index: 2;
79
+ .table-cell {
80
+ position: relative;
81
+ background-color: @header-bg-color !important;
82
+ cursor: pointer;
83
+ }
84
+ .resize-bar {
85
+ position: absolute;
86
+ top: 0;
87
+ bottom: 0;
88
+ right: -3px;
89
+ width: 6px;
90
+ z-index: 2;
91
+ cursor: col-resize;
92
+ }
93
+ }
94
+ .body {
95
+ display: flex;
96
+ flex-direction: row;
97
+ min-height: fit-content;
98
+ }
99
+ .footer {
100
+ position: sticky;
101
+ bottom: 0;
102
+ z-index: 2;
103
+ }
104
+ .header,
105
+ .body,
106
+ .footer {
107
+ .table-cell {
108
+ align-self: stretch; // 子元素高度和父元素一致
109
+ display: inline-flex;
110
+ align-items: center;
111
+ border-top: 1px solid @--border-color-secondary;
112
+ border-right: 1px solid @--border-color-secondary;
113
+ background-color: #fff;
114
+ &.selection-column {
115
+ justify-content: center;
116
+ border-right-color: transparent;
117
+ }
118
+ .action {
119
+ display: inline-flex;
120
+ align-items: center;
121
+ justify-content: center;
122
+ .drag-icon,
123
+ .expand-icon {
124
+ display: inline-flex;
125
+ align-items: center;
126
+ justify-content: center;
127
+ width: 20px;
128
+ height: 20px;
129
+ color: @--text-color-placeholder;
130
+ visibility: hidden;
131
+ }
132
+ .drag-icon {
133
+ cursor: grab;
134
+ }
135
+ .expand-icon:hover {
136
+ color: @--primary-color;
137
+ }
138
+ .middle {
139
+ text-align: center;
140
+ width: 16px;
141
+ margin: 0 2px;
142
+ .order {
143
+ display: inline-block;
144
+ }
145
+ .checkbox {
146
+ display: none;
147
+ }
148
+ }
149
+ }
150
+ &.col--center {
151
+ text-align: center;
152
+ justify-content: center;
153
+ }
154
+ &.col--right {
155
+ text-align: right;
156
+ justify-content: flex-end;
157
+ }
158
+ &.col--fix-left {
159
+ position: sticky;
160
+ z-index: 1;
161
+ }
162
+ &.col--checked {
163
+ background-color: @--primary-1;
164
+ }
165
+ &.active {
166
+ box-shadow: inset 0 0 0 2px @--primary-color;
167
+ background-color: rgba(255, 235, 140, 1);
168
+ }
169
+ .cell {
170
+ .text-overflow-cut();
171
+ padding: 0 @--padding-sm;
172
+ }
173
+ }
174
+ .label-cell,
175
+ .table-cell {
176
+ &:hover {
177
+ .count-select {
178
+ visibility: visible;
179
+ }
180
+ }
181
+ }
182
+ .count-select {
183
+ .text-overflow-cut();
184
+ display: inline-flex;
185
+ align-items: center;
186
+ justify-content: flex-end;
187
+ height: 100%;
188
+ width: 100%;
189
+ padding: 0 @--padding-sm;
190
+ color: @--text-color-placeholder;
191
+ cursor: pointer;
192
+ visibility: hidden;
193
+ &:hover,
194
+ &.ant-dropdown-open {
195
+ visibility: visible;
196
+ background-color: @--background-color-light;
197
+ }
198
+ &.show {
199
+ visibility: visible;
200
+ }
201
+ .icon {
202
+ margin-left: 4px;
203
+ }
204
+ }
205
+ }
206
+ .resize-line {
207
+ position: absolute;
208
+ left: -2px;
209
+ top: 0;
210
+ width: 2px;
211
+ height: 100%;
212
+ background-color: @--primary-color;
213
+ z-index: 2;
214
+ }
215
+ .fixed-line {
216
+ position: absolute;
217
+ left: -1px;
218
+ top: 0;
219
+ width: 0;
220
+ height: 100%;
221
+ border-left: 1px solid @--border-color-base;
222
+ z-index: 2;
223
+ pointer-events: none;
224
+ &::after {
225
+ content: '';
226
+ position: absolute;
227
+ top: 0;
228
+ right: 0;
229
+ bottom: -1px;
230
+ width: 20px;
231
+ transform: translateX(100%);
232
+ transition: box-shadow 0.3s, -webkit-box-shadow 0.3s;
233
+ pointer-events: none;
234
+ }
235
+ &.leave {
236
+ &::after {
237
+ box-shadow: inset 10px 0 8px -8px rgba(0, 0, 0, 0.15);
238
+ }
239
+ }
240
+ &.active {
241
+ border-left: 1px solid @--primary-color;
242
+ border-right: 1px solid @--primary-color;
243
+ }
244
+ }
245
+ .fixed-bar {
246
+ position: absolute;
247
+ top: 0;
248
+ left: -1px;
249
+ width: 6px;
250
+ height: 100%;
251
+ margin-left: -2px;
252
+ background-image: none;
253
+ background-repeat: no-repeat;
254
+ z-index: 1;
255
+ cursor: col-resize;
256
+ &:hover,
257
+ &.active {
258
+ background-image: linear-gradient(to right, transparent 2px, @--border-color-base 2px 4px, transparent 4px 6px);
259
+ z-index: 2;
260
+ .thumb {
261
+ opacity: 1;
262
+ }
263
+ }
264
+ .thumb {
265
+ position: absolute;
266
+ top: 0;
267
+ left: 0;
268
+ width: 100%;
269
+ height: 32px;
270
+ border-radius: 6px;
271
+ background-color: @--primary-color;
272
+ opacity: 0;
273
+ pointer-events: none;
274
+ }
275
+ }
276
+ .content-empty {
277
+ position: absolute;
278
+ width: 100%;
279
+ margin: 20px 0;
280
+ }
281
+ // 左侧面板
282
+ .left-panel {
283
+ position: sticky;
284
+ left: 0;
285
+ z-index: 1;
286
+ .group-label {
287
+ border-right: 0 !important;
288
+ .bor-radius-left();
289
+ &.level0 {
290
+ .bor-left-shadow();
291
+ }
292
+ }
293
+ .row-item {
294
+ &:nth-of-type(1) {
295
+ border-top-left-radius: @border-radius;
296
+ .bor-left-shadow();
297
+ .table-cell:first-child {
298
+ border-top-left-radius: @border-radius;
299
+ }
300
+ }
301
+ &.last {
302
+ border-bottom-left-radius: @border-radius;
303
+ .table-cell:first-child {
304
+ border-bottom-left-radius: @border-radius;
305
+ }
306
+ }
307
+ &.is-leaf {
308
+ .selection-column {
309
+ border-top-color: transparent;
310
+ }
311
+ .cell--indent {
312
+ display: flex;
313
+ background-color: #fff;
314
+ .line {
315
+ flex: 1 0;
316
+ position: relative;
317
+ &::before {
318
+ content: '';
319
+ position: absolute;
320
+ left: 10px;
321
+ height: 100%;
322
+ margin-top: -100%;
323
+ border-left: 1px dashed rgba(0, 0, 0, 0.175);
324
+ }
325
+ }
326
+ }
327
+ }
328
+ }
329
+ .no-group {
330
+ .row-item:last-child {
331
+ .bor-left-shadow();
332
+ }
333
+ }
334
+ }
335
+ .main-panel {
336
+ flex: 1 0;
337
+ z-index: 0;
338
+ .group-label,
339
+ .row-item {
340
+ border-left: 0 !important;
341
+ }
342
+ .group-label {
343
+ .bor-radius-right();
344
+ }
345
+ .row-item {
346
+ &:nth-of-type(1) {
347
+ border-top-right-radius: @border-radius;
348
+ .table-cell:last-child {
349
+ border-top-right-radius: @border-radius;
350
+ }
351
+ }
352
+ &.last {
353
+ border-bottom-right-radius: @border-radius;
354
+ .table-cell:last-child {
355
+ border-bottom-right-radius: @border-radius;
356
+ }
357
+ }
358
+ }
359
+ }
360
+ .container {
361
+ position: relative;
362
+ left: 0;
363
+ top: 0;
364
+ &.no-group {
365
+ .row-item:last-child {
366
+ .table-cell {
367
+ border-bottom: 1px solid @--border-color-secondary;
368
+ }
369
+ .cell--indent {
370
+ height: fill-available;
371
+ height: -webkit-fill-available;
372
+ }
373
+ }
374
+ }
375
+ .group-label {
376
+ position: absolute;
377
+ box-sizing: content-box;
378
+ border: 1px solid @--border-color-secondary;
379
+ background-color: #fff;
380
+ overflow: hidden;
381
+ .label-row {
382
+ display: flex;
383
+ align-items: center;
384
+ }
385
+ .label-cell {
386
+ align-self: stretch;
387
+ display: inline-flex;
388
+ align-items: center;
389
+ &.expandable-column {
390
+ justify-content: center;
391
+ .button-icon {
392
+ & > .anticon {
393
+ transition: transform 0.3s ease;
394
+ }
395
+ &.expand > .anticon {
396
+ transform: rotate(90deg);
397
+ }
398
+ }
399
+ }
400
+ &.col--fix-left {
401
+ position: sticky;
402
+ z-index: 1;
403
+ }
404
+ .title {
405
+ flex-shrink: 0;
406
+ margin-left: 8px;
407
+ margin-right: 20px;
408
+ font-weight: 600;
409
+ .empty {
410
+ color: @--text-color-placeholder;
411
+ font-weight: 400;
412
+ }
413
+ }
414
+ }
415
+ }
416
+ .row-item {
417
+ position: absolute;
418
+ border-left: 1px solid @--border-color-secondary;
419
+ .table-row {
420
+ display: flex;
421
+ align-items: center;
422
+ height: inherit;
423
+ &.row--hover,
424
+ &.row--selection {
425
+ .table-cell,
426
+ .cell--indent {
427
+ background-color: @--background-color-light;
428
+ .middle&:has(.checkbox) {
429
+ .order {
430
+ display: none;
431
+ }
432
+ .checkbox {
433
+ display: inline-flex;
434
+ }
435
+ }
436
+ }
437
+ }
438
+ &.row--highlight {
439
+ .table-cell,
440
+ .cell--indent {
441
+ background-color: @--primary-1;
442
+ }
443
+ }
444
+ &.row--hover {
445
+ .table-cell {
446
+ .drag-icon,
447
+ .expand-icon {
448
+ visibility: visible;
449
+ }
450
+ }
451
+ }
452
+ .cell--expand {
453
+ display: inline-flex;
454
+ align-items: center;
455
+ justify-content: center;
456
+ z-index: 1;
457
+ padding: 3px;
458
+ color: @--text-color-placeholder;
459
+ border-radius: @--border-radius-lg;
460
+ background-color: #fff;
461
+ user-select: none;
462
+ cursor: pointer;
463
+ .icon {
464
+ transition: transform 0.3s ease;
465
+ }
466
+ &.fold {
467
+ .icon {
468
+ transform: rotate(-90deg);
469
+ }
470
+ }
471
+ &.disabled {
472
+ color: @--disabled-color;
473
+ cursor: not-allowed;
474
+ }
475
+ }
476
+ }
477
+ }
478
+ }
479
+ // size
480
+ &.small {
481
+ .label-row,
482
+ .table-cell,
483
+ .cell--indent {
484
+ height: 26px;
485
+ }
486
+ }
487
+ &.middle {
488
+ .label-row,
489
+ .table-cell,
490
+ .cell--indent {
491
+ height: 34px;
492
+ }
493
+ }
494
+ &.large {
495
+ .label-row,
496
+ .table-cell,
497
+ .cell--indent {
498
+ height: 42px;
499
+ }
500
+ }
501
+ }