@gmfe/table-x 2.14.17 → 2.14.20

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.
Files changed (44) hide show
  1. package/README.md +13 -13
  2. package/package.json +4 -4
  3. package/src/base/index.js +142 -142
  4. package/src/base/td.js +56 -56
  5. package/src/base/th.js +48 -48
  6. package/src/base/thead.js +26 -26
  7. package/src/base/tr.js +53 -53
  8. package/src/base/virtualized.js +219 -219
  9. package/src/hoc/diy_table_x/components/diy_table_x_modal.js +135 -135
  10. package/src/hoc/diy_table_x/components/modal_list.js +78 -78
  11. package/src/hoc/diy_table_x/components/modal_selector.js +56 -56
  12. package/src/hoc/diy_table_x/index.js +196 -196
  13. package/src/hoc/edit_table_x.js +20 -20
  14. package/src/hoc/expand_table_x/index.js +140 -140
  15. package/src/hoc/expand_table_x/util.js +27 -27
  16. package/src/hoc/fixed_columns_table_x.js +29 -29
  17. package/src/hoc/select_table_x/cell.js +51 -51
  18. package/src/hoc/select_table_x/header.js +28 -28
  19. package/src/hoc/select_table_x/index.js +139 -139
  20. package/src/hoc/select_table_x/util.js +10 -10
  21. package/src/hoc/sortable_table_x.js +52 -52
  22. package/src/hoc/sub_table_x.js +44 -44
  23. package/src/index.js +53 -53
  24. package/src/index.less +515 -515
  25. package/src/stories/table_x.stories.js +324 -324
  26. package/src/stories/table_x_hoc.stories.js +427 -427
  27. package/src/stories/table_x_hoc_select_expand.stories.js +256 -256
  28. package/src/util/batch_action_bar.js +124 -124
  29. package/src/util/edit.js +83 -83
  30. package/src/util/index.js +191 -191
  31. package/src/util/operation.js +249 -249
  32. package/src/util/sort_header.js +49 -49
  33. package/src/variables.less +28 -28
  34. package/svg/business.svg +20 -20
  35. package/svg/check-detail.svg +18 -18
  36. package/svg/closeup.svg +20 -20
  37. package/svg/delete.svg +10 -10
  38. package/svg/edit-pen.svg +17 -17
  39. package/svg/empty.svg +27 -27
  40. package/svg/expand.svg +21 -21
  41. package/svg/pen.svg +12 -12
  42. package/svg/recover.svg +33 -33
  43. package/svg/remove.svg +1 -1
  44. package/svg/setting.svg +17 -17
package/src/index.less CHANGED
@@ -1,515 +1,515 @@
1
- @import '~@gmfe/react/src/var.less';
2
- @import './variables.less';
3
-
4
- @gm-table-x-header-bg: #e8eaf0;
5
- @gm-table-x-border-color: rgba(216, 222, 231, 0.5);
6
- @gm-table-x-sort-color: #ccc;
7
- @gm-table-x-sort-active-color: #999;
8
- @gm-table-x-select-color: rgba(36, 51, 81, 0.8);
9
- @gm-table-x-select-action-bar-height: 50px;
10
-
11
- .gm-table-x {
12
- border-bottom: 1px solid @gm-table-x-border-color;
13
- overflow: auto;
14
- position: relative;
15
-
16
- .gm-table-x-table {
17
- // 性能考虑
18
- z-index: 1;
19
- transform: translateZ(0);
20
- display: block; // 覆盖table 默认display
21
-
22
- .gm-table-x-tr {
23
- display: flex;
24
- min-height: 60px;
25
-
26
- .gm-table-x-th {
27
- background: @gm-table-x-header-bg;
28
- display: flex;
29
- flex-direction: column;
30
- justify-content: center;
31
- color: @gm-color-first;
32
- font-weight: bold;
33
- }
34
-
35
- .gm-table-x-td {
36
- display: flex;
37
- flex-direction: column;
38
- justify-content: center;
39
- }
40
-
41
- .gm-table-x-th,
42
- .gm-table-x-td {
43
- flex: 1 0;
44
- padding: 8px;
45
- white-space: normal;
46
- word-wrap: break-word;
47
- word-break: break-all;
48
-
49
- &.gm-table-x-icon-column {
50
- padding-right: 5px;
51
- padding-left: 5px;
52
- .gm-table-x-icon.gm-popover-active {
53
- color: @brand-primary;
54
- }
55
- }
56
-
57
- &:first-child {
58
- padding-left: 20px;
59
- }
60
-
61
- &:last-child {
62
- padding-right: 20px;
63
- }
64
-
65
- .gm-table-x-expand {
66
- font-size: 14px;
67
- padding-top: 2px;
68
- }
69
- }
70
- }
71
-
72
- .gm-table-x-thead {
73
- position: sticky;
74
- top: 0;
75
- z-index: 10;
76
- display: block; // 覆盖thead 默认display
77
-
78
- .gm-table-x-tr {
79
- min-height: 46px;
80
- }
81
- }
82
-
83
- .gm-table-x-tbody {
84
- display: block; // 覆盖tbody 默认display
85
-
86
- .gm-table-x-tr {
87
- &.gm-table-x-tr-even {
88
- .gm-table-x-td {
89
- background: @gm-back-body-bg;
90
- }
91
- }
92
-
93
- &.gm-table-x-tr-odd {
94
- .gm-table-x-td {
95
- background: white;
96
- }
97
- }
98
-
99
- &.sortable-chosen {
100
- .gm-table-x-tr {
101
- .gm-table-x-td {
102
- background-color: @table-bg-hover;
103
- }
104
- }
105
- }
106
- }
107
-
108
- // disable
109
- .gm-table-x-tr-disable.gm-table-x-tr {
110
- .gm-table-x-td {
111
- background-color: @gm-bg-disabled !important;
112
- }
113
- }
114
-
115
- // 高亮
116
- .gm-table-x-tr-highlight.gm-table-x-tr {
117
- .gm-table-x-td {
118
- background-color: @table-bg-hover !important;
119
- }
120
- }
121
-
122
- // 拖拽的时候没有hover效果
123
- &:not(.gm-table-x-sortable-active) {
124
- .gm-table-x-tr {
125
- &:hover {
126
- .gm-table-x-td {
127
- background-color: @table-bg-hover;
128
- }
129
- }
130
- }
131
- }
132
- }
133
-
134
- /* sort */
135
- // 排序样式
136
- .gm-table-x-sort-header {
137
- position: relative;
138
- padding: 0 8px;
139
-
140
- &::before {
141
- content: '';
142
- position: absolute;
143
- right: 4px;
144
- bottom: 8px;
145
- width: 0;
146
- height: 0;
147
- border-top: 4px solid transparent;
148
- border-right: 4px solid transparent;
149
- border-bottom: 6px solid @gm-table-x-sort-color;
150
- border-left: 4px solid transparent;
151
- }
152
-
153
- &::after {
154
- content: '';
155
- position: absolute;
156
- right: 4px;
157
- bottom: -3px;
158
- width: 0;
159
- height: 0;
160
- border-top: 6px solid @gm-table-x-sort-color;
161
- border-right: 4px solid transparent;
162
- border-bottom: 4px solid transparent;
163
- border-left: 4px solid transparent;
164
- }
165
-
166
- &.gm-table-x-sort-header-asc {
167
- &::before {
168
- border-bottom: 5px solid @gm-table-x-sort-active-color;
169
- }
170
- }
171
-
172
- &.gm-table-x-sort-header-desc {
173
- &::after {
174
- border-top: 5px solid @gm-table-x-sort-active-color;
175
- }
176
- }
177
- }
178
-
179
- /* sort end */
180
-
181
- /* resizer */
182
-
183
- .gm-table-x-resizer {
184
- position: absolute;
185
- width: 10px;
186
- right: -5px;
187
- top: 0;
188
- bottom: 0;
189
- z-index: 1;
190
- }
191
-
192
- // 最后一个需要去掉
193
- // stylelint-disable-next-line
194
- .gm-table-x-th {
195
- // stylelint-disable-next-line
196
- &:last-child {
197
- .gm-table-x-resizer {
198
- display: none;
199
- }
200
- }
201
- }
202
-
203
- /* resizer end */
204
-
205
- /* fixed */
206
-
207
- .gm-table-x-th,
208
- .gm-table-x-td {
209
- &.gm-table-x-fixed-left,
210
- &.gm-table-x-fixed-right {
211
- position: sticky !important;
212
- z-index: 1;
213
- }
214
-
215
- &.gm-table-x-fixed-left {
216
- border-right: 1px solid @gm-table-x-border-color !important;
217
- }
218
-
219
- &.gm-table-x-fixed-right {
220
- border-left: 1px solid @gm-table-x-border-color !important;
221
- }
222
- }
223
- }
224
-
225
- &.gm-table-x-empty {
226
- min-height: 166px;
227
- }
228
-
229
- &.gm-table-x-tiled {
230
- border-left: 1px solid @gm-table-x-border-color;
231
- border-right: 1px solid @gm-table-x-border-color;
232
- }
233
-
234
- // edit button 和 gm-table-x-edit 没有关系,只是名字相近
235
- .gm-table-x-edit-button {
236
- visibility: hidden;
237
- font-size: 14px;
238
- display: inline-block;
239
- cursor: pointer;
240
- width: 20px;
241
-
242
- &[disabled] {
243
- cursor: not-allowed;
244
- }
245
-
246
- &:hover {
247
- color: @brand-primary;
248
- }
249
-
250
- &.gm-popover-active {
251
- visibility: visible;
252
- color: @brand-primary;
253
- }
254
- }
255
-
256
- .gm-table-x-tr:hover {
257
- .gm-table-x-edit-button {
258
- visibility: visible;
259
- }
260
- }
261
- }
262
-
263
- /* hoc 相关 */
264
- .gm-table-x-select-batch-action-bar-container {
265
- position: relative;
266
-
267
- .gm-table-x-select-batch-action-bar {
268
- position: absolute;
269
- bottom: 0;
270
- left: 0;
271
- width: 100%;
272
- z-index: 10;
273
- padding-left: 20px;
274
- background: @gm-back-body-bg;
275
- height: @gm-table-x-select-action-bar-height;
276
- }
277
- }
278
-
279
- .gm-table-x-sub-table {
280
- border: 1px solid @brand-primary;
281
- background: @gm-back-body-bg;
282
-
283
- .gm-table-x-th {
284
- background: @gm-back-body-bg !important;
285
- border-bottom: 1px solid @gm-table-x-border-color;
286
-
287
- &:first-child {
288
- border-bottom: transparent !important;
289
- }
290
- }
291
-
292
- .gm-table-x-td {
293
- border-bottom: 1px solid @gm-table-x-border-color;
294
- background: transparent !important;
295
-
296
- &:first-child {
297
- border-bottom: transparent !important;
298
- }
299
- }
300
- }
301
-
302
- .gm-table-x-edit-table {
303
- // action
304
- .gm-table-x-edit-action-add {
305
- display: inline-block;
306
- margin-right: 18px;
307
- cursor: pointer;
308
- color: @brand-primary;
309
-
310
- svg {
311
- width: 20px;
312
- height: 20px;
313
- }
314
-
315
- &.disabled {
316
- color: fadeout(@brand-primary, 50%);
317
- cursor: not-allowed;
318
- }
319
- }
320
-
321
- .gm-table-x-edit-action-delete {
322
- display: inline-block;
323
- color: @brand-danger;
324
- cursor: pointer;
325
-
326
- svg {
327
- width: 20px;
328
- height: 20px;
329
- }
330
-
331
- &.disabled {
332
- color: fadeout(@brand-danger, 50%);
333
- cursor: not-allowed;
334
- }
335
- }
336
-
337
- // 耦合其他组件
338
- .gm-table-x-td {
339
- .gm-input {
340
- .gm-table-x-edit-table-common-input();
341
- }
342
-
343
- .gm-input-number {
344
- .gm-table-x-edit-table-common-input();
345
- }
346
-
347
- .gm-more-select {
348
- .gm-more-select-selected {
349
- .gm-table-x-edit-table-common-input();
350
-
351
- padding-top: 0;
352
- padding-bottom: 0;
353
-
354
- .gm-more-select-clear-btn {
355
- padding: 0;
356
- right: 5px;
357
- }
358
- }
359
- }
360
-
361
- .gm-select {
362
- display: block;
363
-
364
- .gm-selection-selected {
365
- .gm-table-x-edit-table-common-input();
366
-
367
- line-height: 22px;
368
- padding-right: 20px;
369
- }
370
- }
371
-
372
- .gm-selected {
373
- input {
374
- .gm-table-x-edit-table-common-input();
375
-
376
- padding-right: 20px;
377
- }
378
- }
379
-
380
- .gm-selection {
381
- input {
382
- .gm-table-x-edit-table-common-input();
383
-
384
- padding-right: 20px;
385
- }
386
- }
387
- }
388
-
389
- // action
390
- .gm-react-edit-table-action-add {
391
- width: 20px;
392
- height: 20px;
393
- color: @brand-primary;
394
- margin-right: 18px;
395
- cursor: pointer;
396
-
397
- &.disabled {
398
- color: fadeout(@brand-primary, 50%);
399
- cursor: not-allowed;
400
- }
401
- }
402
-
403
- .gm-react-edit-table-action-delete {
404
- width: 20px;
405
- height: 20px;
406
- color: @brand-danger;
407
- cursor: pointer;
408
-
409
- &.disabled {
410
- color: fadeout(@brand-danger, 50%);
411
- cursor: not-allowed;
412
- }
413
- }
414
- }
415
-
416
- .gm-react-table-x-diy-modal {
417
- width: 900px;
418
-
419
- .gm-react-table-x-diy-modal-header {
420
- .gm-react-table-x-diy-modal-header-title {
421
- font-size: 14px;
422
- border-left: 3px solid @brand-primary;
423
- }
424
-
425
- .gm-react-table-x-diy-modal-header-close {
426
- font-size: 16px;
427
- color: #000923;
428
- text-shadow: 0 1px 0 #fff;
429
- font-weight: bold;
430
- transition: color 0.5s;
431
- border: none;
432
- }
433
- }
434
-
435
- .gm-react-table-x-diy-modal-content{
436
- border-top: 1px solid @gm-table-x-border-color;
437
- border-bottom: 1px solid @gm-table-x-border-color;
438
- }
439
-
440
- .gm-react-table-x-diy-modal-title {
441
- background-color: @gm-back-body-bg;
442
- border-bottom: 1px solid @gm-table-x-border-color;
443
- }
444
-
445
- .gm-react-table-x-diy-modal-selector {
446
- & > div {
447
- padding: 10px;
448
- }
449
-
450
- width: 80%;
451
- border-right: 1px solid @gm-table-x-border-color;
452
- }
453
-
454
- .gm-react-table-x-diy-modal-list {
455
- & > div {
456
- padding: 10px;
457
- }
458
-
459
- width: 20%;
460
-
461
- .gm-react-table-x-diy-modal-list-ul {
462
- list-style-type: none;
463
- padding: 0;
464
- margin: 30px 0;
465
- max-height: 400px;
466
- overflow: auto;
467
-
468
- .gm-react-table-x-diy-modal-list-li {
469
- position: relative;
470
- user-select: none;
471
- padding: 5px 10px;
472
-
473
- &::before {
474
- content: '\2022'; //圆点
475
- font-size: 16px;
476
- margin-right: 2px;
477
- }
478
-
479
- .gm-react-table-x-diy-modal-list-li-remove {
480
- position: absolute;
481
- top: 10px;
482
- right: 0px;
483
- width: 14px;
484
- height: 14px;
485
- }
486
- }
487
-
488
- .gm-react-table-x-diy-modal-list-li.active {
489
- background: #d7e8fc;
490
- }
491
-
492
- .gm-react-table-x-diy-modal-list-li:hover {
493
- background: #d7e8fc;
494
- }
495
- }
496
- }
497
- }
498
-
499
- @media (max-width: 768px) {
500
- .gm-react-table-x-diy-modal {
501
- width: 600px;
502
- }
503
- }
504
-
505
- /* 耦合其他组件 */
506
-
507
- // stylelint-disable-next-line
508
- .gm-table-x {
509
- // select 样式
510
- .gm-table-x-select:not(.disabled) {
511
- input:not(:checked) + span {
512
- border-color: @gm-table-x-select-color;
513
- }
514
- }
515
- }
1
+ @import '~@gmfe/react/src/var.less';
2
+ @import './variables.less';
3
+
4
+ @gm-table-x-header-bg: #e8eaf0;
5
+ @gm-table-x-border-color: rgba(216, 222, 231, 0.5);
6
+ @gm-table-x-sort-color: #ccc;
7
+ @gm-table-x-sort-active-color: #999;
8
+ @gm-table-x-select-color: rgba(36, 51, 81, 0.8);
9
+ @gm-table-x-select-action-bar-height: 50px;
10
+
11
+ .gm-table-x {
12
+ border-bottom: 1px solid @gm-table-x-border-color;
13
+ overflow: auto;
14
+ position: relative;
15
+
16
+ .gm-table-x-table {
17
+ // 性能考虑
18
+ z-index: 1;
19
+ transform: translateZ(0);
20
+ display: block; // 覆盖table 默认display
21
+
22
+ .gm-table-x-tr {
23
+ display: flex;
24
+ min-height: 60px;
25
+
26
+ .gm-table-x-th {
27
+ background: @gm-table-x-header-bg;
28
+ display: flex;
29
+ flex-direction: column;
30
+ justify-content: center;
31
+ color: @gm-color-first;
32
+ font-weight: bold;
33
+ }
34
+
35
+ .gm-table-x-td {
36
+ display: flex;
37
+ flex-direction: column;
38
+ justify-content: center;
39
+ }
40
+
41
+ .gm-table-x-th,
42
+ .gm-table-x-td {
43
+ flex: 1 0;
44
+ padding: 8px;
45
+ white-space: normal;
46
+ word-wrap: break-word;
47
+ word-break: break-all;
48
+
49
+ &.gm-table-x-icon-column {
50
+ padding-right: 5px;
51
+ padding-left: 5px;
52
+ .gm-table-x-icon.gm-popover-active {
53
+ color: @brand-primary;
54
+ }
55
+ }
56
+
57
+ &:first-child {
58
+ padding-left: 20px;
59
+ }
60
+
61
+ &:last-child {
62
+ padding-right: 20px;
63
+ }
64
+
65
+ .gm-table-x-expand {
66
+ font-size: 14px;
67
+ padding-top: 2px;
68
+ }
69
+ }
70
+ }
71
+
72
+ .gm-table-x-thead {
73
+ position: sticky;
74
+ top: 0;
75
+ z-index: 10;
76
+ display: block; // 覆盖thead 默认display
77
+
78
+ .gm-table-x-tr {
79
+ min-height: 46px;
80
+ }
81
+ }
82
+
83
+ .gm-table-x-tbody {
84
+ display: block; // 覆盖tbody 默认display
85
+
86
+ .gm-table-x-tr {
87
+ &.gm-table-x-tr-even {
88
+ .gm-table-x-td {
89
+ background: @gm-back-body-bg;
90
+ }
91
+ }
92
+
93
+ &.gm-table-x-tr-odd {
94
+ .gm-table-x-td {
95
+ background: white;
96
+ }
97
+ }
98
+
99
+ &.sortable-chosen {
100
+ .gm-table-x-tr {
101
+ .gm-table-x-td {
102
+ background-color: @table-bg-hover;
103
+ }
104
+ }
105
+ }
106
+ }
107
+
108
+ // disable
109
+ .gm-table-x-tr-disable.gm-table-x-tr {
110
+ .gm-table-x-td {
111
+ background-color: @gm-bg-disabled !important;
112
+ }
113
+ }
114
+
115
+ // 高亮
116
+ .gm-table-x-tr-highlight.gm-table-x-tr {
117
+ .gm-table-x-td {
118
+ background-color: @table-bg-hover !important;
119
+ }
120
+ }
121
+
122
+ // 拖拽的时候没有hover效果
123
+ &:not(.gm-table-x-sortable-active) {
124
+ .gm-table-x-tr {
125
+ &:hover {
126
+ .gm-table-x-td {
127
+ background-color: @table-bg-hover;
128
+ }
129
+ }
130
+ }
131
+ }
132
+ }
133
+
134
+ /* sort */
135
+ // 排序样式
136
+ .gm-table-x-sort-header {
137
+ position: relative;
138
+ padding: 0 8px;
139
+
140
+ &::before {
141
+ content: '';
142
+ position: absolute;
143
+ right: 4px;
144
+ bottom: 8px;
145
+ width: 0;
146
+ height: 0;
147
+ border-top: 4px solid transparent;
148
+ border-right: 4px solid transparent;
149
+ border-bottom: 6px solid @gm-table-x-sort-color;
150
+ border-left: 4px solid transparent;
151
+ }
152
+
153
+ &::after {
154
+ content: '';
155
+ position: absolute;
156
+ right: 4px;
157
+ bottom: -3px;
158
+ width: 0;
159
+ height: 0;
160
+ border-top: 6px solid @gm-table-x-sort-color;
161
+ border-right: 4px solid transparent;
162
+ border-bottom: 4px solid transparent;
163
+ border-left: 4px solid transparent;
164
+ }
165
+
166
+ &.gm-table-x-sort-header-asc {
167
+ &::before {
168
+ border-bottom: 5px solid @gm-table-x-sort-active-color;
169
+ }
170
+ }
171
+
172
+ &.gm-table-x-sort-header-desc {
173
+ &::after {
174
+ border-top: 5px solid @gm-table-x-sort-active-color;
175
+ }
176
+ }
177
+ }
178
+
179
+ /* sort end */
180
+
181
+ /* resizer */
182
+
183
+ .gm-table-x-resizer {
184
+ position: absolute;
185
+ width: 10px;
186
+ right: -5px;
187
+ top: 0;
188
+ bottom: 0;
189
+ z-index: 1;
190
+ }
191
+
192
+ // 最后一个需要去掉
193
+ // stylelint-disable-next-line
194
+ .gm-table-x-th {
195
+ // stylelint-disable-next-line
196
+ &:last-child {
197
+ .gm-table-x-resizer {
198
+ display: none;
199
+ }
200
+ }
201
+ }
202
+
203
+ /* resizer end */
204
+
205
+ /* fixed */
206
+
207
+ .gm-table-x-th,
208
+ .gm-table-x-td {
209
+ &.gm-table-x-fixed-left,
210
+ &.gm-table-x-fixed-right {
211
+ position: sticky !important;
212
+ z-index: 1;
213
+ }
214
+
215
+ &.gm-table-x-fixed-left {
216
+ border-right: 1px solid @gm-table-x-border-color !important;
217
+ }
218
+
219
+ &.gm-table-x-fixed-right {
220
+ border-left: 1px solid @gm-table-x-border-color !important;
221
+ }
222
+ }
223
+ }
224
+
225
+ &.gm-table-x-empty {
226
+ min-height: 166px;
227
+ }
228
+
229
+ &.gm-table-x-tiled {
230
+ border-left: 1px solid @gm-table-x-border-color;
231
+ border-right: 1px solid @gm-table-x-border-color;
232
+ }
233
+
234
+ // edit button 和 gm-table-x-edit 没有关系,只是名字相近
235
+ .gm-table-x-edit-button {
236
+ visibility: hidden;
237
+ font-size: 14px;
238
+ display: inline-block;
239
+ cursor: pointer;
240
+ width: 20px;
241
+
242
+ &[disabled] {
243
+ cursor: not-allowed;
244
+ }
245
+
246
+ &:hover {
247
+ color: @brand-primary;
248
+ }
249
+
250
+ &.gm-popover-active {
251
+ visibility: visible;
252
+ color: @brand-primary;
253
+ }
254
+ }
255
+
256
+ .gm-table-x-tr:hover {
257
+ .gm-table-x-edit-button {
258
+ visibility: visible;
259
+ }
260
+ }
261
+ }
262
+
263
+ /* hoc 相关 */
264
+ .gm-table-x-select-batch-action-bar-container {
265
+ position: relative;
266
+
267
+ .gm-table-x-select-batch-action-bar {
268
+ position: absolute;
269
+ bottom: 0;
270
+ left: 0;
271
+ width: 100%;
272
+ z-index: 10;
273
+ padding-left: 20px;
274
+ background: @gm-back-body-bg;
275
+ height: @gm-table-x-select-action-bar-height;
276
+ }
277
+ }
278
+
279
+ .gm-table-x-sub-table {
280
+ border: 1px solid @brand-primary;
281
+ background: @gm-back-body-bg;
282
+
283
+ .gm-table-x-th {
284
+ background: @gm-back-body-bg !important;
285
+ border-bottom: 1px solid @gm-table-x-border-color;
286
+
287
+ &:first-child {
288
+ border-bottom: transparent !important;
289
+ }
290
+ }
291
+
292
+ .gm-table-x-td {
293
+ border-bottom: 1px solid @gm-table-x-border-color;
294
+ background: transparent !important;
295
+
296
+ &:first-child {
297
+ border-bottom: transparent !important;
298
+ }
299
+ }
300
+ }
301
+
302
+ .gm-table-x-edit-table {
303
+ // action
304
+ .gm-table-x-edit-action-add {
305
+ display: inline-block;
306
+ margin-right: 18px;
307
+ cursor: pointer;
308
+ color: @brand-primary;
309
+
310
+ svg {
311
+ width: 20px;
312
+ height: 20px;
313
+ }
314
+
315
+ &.disabled {
316
+ color: fadeout(@brand-primary, 50%);
317
+ cursor: not-allowed;
318
+ }
319
+ }
320
+
321
+ .gm-table-x-edit-action-delete {
322
+ display: inline-block;
323
+ color: @brand-danger;
324
+ cursor: pointer;
325
+
326
+ svg {
327
+ width: 20px;
328
+ height: 20px;
329
+ }
330
+
331
+ &.disabled {
332
+ color: fadeout(@brand-danger, 50%);
333
+ cursor: not-allowed;
334
+ }
335
+ }
336
+
337
+ // 耦合其他组件
338
+ .gm-table-x-td {
339
+ .gm-input {
340
+ .gm-table-x-edit-table-common-input();
341
+ }
342
+
343
+ .gm-input-number {
344
+ .gm-table-x-edit-table-common-input();
345
+ }
346
+
347
+ .gm-more-select {
348
+ .gm-more-select-selected {
349
+ .gm-table-x-edit-table-common-input();
350
+
351
+ padding-top: 0;
352
+ padding-bottom: 0;
353
+
354
+ .gm-more-select-clear-btn {
355
+ padding: 0;
356
+ right: 5px;
357
+ }
358
+ }
359
+ }
360
+
361
+ .gm-select {
362
+ display: block;
363
+
364
+ .gm-selection-selected {
365
+ .gm-table-x-edit-table-common-input();
366
+
367
+ line-height: 22px;
368
+ padding-right: 20px;
369
+ }
370
+ }
371
+
372
+ .gm-selected {
373
+ input {
374
+ .gm-table-x-edit-table-common-input();
375
+
376
+ padding-right: 20px;
377
+ }
378
+ }
379
+
380
+ .gm-selection {
381
+ input {
382
+ .gm-table-x-edit-table-common-input();
383
+
384
+ padding-right: 20px;
385
+ }
386
+ }
387
+ }
388
+
389
+ // action
390
+ .gm-react-edit-table-action-add {
391
+ width: 20px;
392
+ height: 20px;
393
+ color: @brand-primary;
394
+ margin-right: 18px;
395
+ cursor: pointer;
396
+
397
+ &.disabled {
398
+ color: fadeout(@brand-primary, 50%);
399
+ cursor: not-allowed;
400
+ }
401
+ }
402
+
403
+ .gm-react-edit-table-action-delete {
404
+ width: 20px;
405
+ height: 20px;
406
+ color: @brand-danger;
407
+ cursor: pointer;
408
+
409
+ &.disabled {
410
+ color: fadeout(@brand-danger, 50%);
411
+ cursor: not-allowed;
412
+ }
413
+ }
414
+ }
415
+
416
+ .gm-react-table-x-diy-modal {
417
+ width: 900px;
418
+
419
+ .gm-react-table-x-diy-modal-header {
420
+ .gm-react-table-x-diy-modal-header-title {
421
+ font-size: 14px;
422
+ border-left: 3px solid @brand-primary;
423
+ }
424
+
425
+ .gm-react-table-x-diy-modal-header-close {
426
+ font-size: 16px;
427
+ color: #000923;
428
+ text-shadow: 0 1px 0 #fff;
429
+ font-weight: bold;
430
+ transition: color 0.5s;
431
+ border: none;
432
+ }
433
+ }
434
+
435
+ .gm-react-table-x-diy-modal-content{
436
+ border-top: 1px solid @gm-table-x-border-color;
437
+ border-bottom: 1px solid @gm-table-x-border-color;
438
+ }
439
+
440
+ .gm-react-table-x-diy-modal-title {
441
+ background-color: @gm-back-body-bg;
442
+ border-bottom: 1px solid @gm-table-x-border-color;
443
+ }
444
+
445
+ .gm-react-table-x-diy-modal-selector {
446
+ & > div {
447
+ padding: 10px;
448
+ }
449
+
450
+ width: 80%;
451
+ border-right: 1px solid @gm-table-x-border-color;
452
+ }
453
+
454
+ .gm-react-table-x-diy-modal-list {
455
+ & > div {
456
+ padding: 10px;
457
+ }
458
+
459
+ width: 20%;
460
+
461
+ .gm-react-table-x-diy-modal-list-ul {
462
+ list-style-type: none;
463
+ padding: 0;
464
+ margin: 30px 0;
465
+ max-height: 400px;
466
+ overflow: auto;
467
+
468
+ .gm-react-table-x-diy-modal-list-li {
469
+ position: relative;
470
+ user-select: none;
471
+ padding: 5px 10px;
472
+
473
+ &::before {
474
+ content: '\2022'; //圆点
475
+ font-size: 16px;
476
+ margin-right: 2px;
477
+ }
478
+
479
+ .gm-react-table-x-diy-modal-list-li-remove {
480
+ position: absolute;
481
+ top: 10px;
482
+ right: 0px;
483
+ width: 14px;
484
+ height: 14px;
485
+ }
486
+ }
487
+
488
+ .gm-react-table-x-diy-modal-list-li.active {
489
+ background: #d7e8fc;
490
+ }
491
+
492
+ .gm-react-table-x-diy-modal-list-li:hover {
493
+ background: #d7e8fc;
494
+ }
495
+ }
496
+ }
497
+ }
498
+
499
+ @media (max-width: 768px) {
500
+ .gm-react-table-x-diy-modal {
501
+ width: 600px;
502
+ }
503
+ }
504
+
505
+ /* 耦合其他组件 */
506
+
507
+ // stylelint-disable-next-line
508
+ .gm-table-x {
509
+ // select 样式
510
+ .gm-table-x-select:not(.disabled) {
511
+ input:not(:checked) + span {
512
+ border-color: @gm-table-x-select-color;
513
+ }
514
+ }
515
+ }