dlt-for-react 1.0.3 → 1.0.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.
Files changed (66) hide show
  1. package/README.md +4 -1
  2. package/assets/components/KyCheckButton/index.less +23 -0
  3. package/assets/components/KyCollapse/index.less +15 -0
  4. package/assets/components/KyContainerFrame/index.less +21 -0
  5. package/assets/components/KyEditableTable/index.less +116 -0
  6. package/assets/components/KyEmpty/index.less +8 -0
  7. package/assets/components/KyIcon/index.less +6 -0
  8. package/assets/components/KyMore/index.less +9 -0
  9. package/assets/components/KyTable/checkbuttons.less +23 -0
  10. package/assets/components/KyTable/highSearchForm.less +16 -0
  11. package/assets/components/KyTable/index.less +558 -0
  12. package/assets/components/KyTitle/index.less +39 -0
  13. package/assets/images/noData.png +0 -0
  14. package/lib/components/KyBtnBox/index.js +137 -0
  15. package/lib/components/KyCheckBox/index.js +361 -0
  16. package/lib/components/KyCheckButton/index.js +256 -0
  17. package/lib/components/KyCollapse/index.js +144 -0
  18. package/lib/components/KyContainerFrame/index.js +239 -0
  19. package/lib/components/KyEditableTable/component.js +216 -0
  20. package/lib/components/KyEditableTable/index.js +1537 -0
  21. package/lib/components/KyEmpty/index.js +102 -0
  22. package/lib/components/KyExcel/ExcelForm.js +111 -0
  23. package/lib/components/KyExcel/index.js +601 -0
  24. package/lib/components/KyIcon/index.js +51 -0
  25. package/lib/components/KyModal/buildTitle.js +1 -0
  26. package/lib/components/KyModal/dragM.js +1 -0
  27. package/lib/components/KyMore/index.js +74 -0
  28. package/lib/components/KyPreview/index.js +1 -0
  29. package/lib/components/KyTable/AddFieldsModal.js +360 -0
  30. package/lib/components/KyTable/action.js +222 -0
  31. package/lib/components/KyTable/checkButtons.js +244 -0
  32. package/lib/components/KyTable/data.js +726 -0
  33. package/lib/components/KyTable/expexcel.js +269 -0
  34. package/lib/components/KyTable/highSearchForm.js +749 -0
  35. package/lib/components/KyTable/highSelect.js +313 -0
  36. package/lib/components/KyTable/index.js +2075 -0
  37. package/lib/components/KyTable/marqueenText.js +142 -0
  38. package/lib/components/KyTable/overflowColumn.js +113 -0
  39. package/lib/components/KyTable/text.js +96 -0
  40. package/lib/components/KyTable/textGroup.js +108 -0
  41. package/lib/components/KyTitle/index.js +127 -0
  42. package/lib/components/KyUpload/index.js +1 -0
  43. package/lib/index.js +240 -59
  44. package/lib/layouts/Exception/403/index.js +1 -0
  45. package/lib/layouts/Exception/403.js +1 -0
  46. package/lib/layouts/Exception/404.js +1 -0
  47. package/lib/layouts/Exception/500.js +1 -0
  48. package/lib/layouts/LeftMenu/index.js +1 -0
  49. package/lib/layouts/Login/lyPassword.js +1 -0
  50. package/lib/layouts/NavigationBar/index.js +1 -0
  51. package/lib/layouts/Top/index.js +1 -0
  52. package/lib/layouts/TopMenu/index.js +1 -0
  53. package/lib/layouts/layout/index.js +1 -0
  54. package/lib/layouts/mixTop/index.js +1 -0
  55. package/lib/layouts/settingDrawer/colorChange.js +1 -0
  56. package/lib/layouts/settingDrawer/colorPicker.js +1 -0
  57. package/lib/utils/MD5.js +256 -0
  58. package/lib/utils/NHCore.js +273 -0
  59. package/lib/utils/NHFetch.js +451 -0
  60. package/lib/utils/common.js +516 -0
  61. package/lib/utils/createUuid.js +37 -0
  62. package/lib/utils/equalsObj.js +59 -0
  63. package/lib/utils/getLoginUser.js +10 -0
  64. package/lib/utils/getSize.js +27 -0
  65. package/lib/utils/index.js +804 -0
  66. package/package.json +2 -2
@@ -0,0 +1,558 @@
1
+ :global {
2
+ .ky-nhTable-highSearch {
3
+ margin-bottom: 10px;
4
+ div.ant-select-selection {
5
+ border-width: 1px !important;
6
+ }
7
+ button.ant-btn {
8
+ margin: 10px 0 0px 10px;
9
+ }
10
+ div.ant-form-item {
11
+ margin-bottom: 0px;
12
+ }
13
+ span.ant-time-picker {
14
+ width: 100%;
15
+ }
16
+ }
17
+ // 添加搜索字段模态框样式
18
+ .addSearchFieldsModal {
19
+ .searchBox {
20
+ margin-bottom: 10px;
21
+ }
22
+ .checkAllBox {
23
+ margin: 0 0 8px 9px;
24
+ font-size: 12px;
25
+ .tip {
26
+ color: #bbb;
27
+ }
28
+ .num {
29
+ color: #fc0;
30
+ }
31
+ }
32
+ table {
33
+ width: 100%;
34
+ border: 1px solid #e8e8e8;
35
+ border-right: 0;
36
+ border-bottom: 0;
37
+ border-radius: 4px 4px 0 0;
38
+ border-collapse: separate;
39
+ border-spacing: 0;
40
+ td {
41
+ font-size: 12px;
42
+ border-right: 1px solid #e8e8e8;
43
+ border-bottom: 1px solid #e8e8e8;
44
+ &:hover {
45
+ background-color: #eef7fe;
46
+ }
47
+ }
48
+ .ant-checkbox-wrapper {
49
+ width: 100%;
50
+ height: 100%;
51
+ padding: 6px 8px;
52
+ }
53
+ }
54
+ .textHighLight {
55
+ background-color: #fff5cc;
56
+ &.active {
57
+ background-color: #ffdc52;
58
+ }
59
+ }
60
+ }
61
+ .xgui-table-searchDiv {
62
+ margin-bottom: 16px;
63
+ }
64
+ .xgui-table-searchDiv .ant-select-selection,
65
+ .xgui-table-searchDiv .ant-select-selection:active,
66
+ .xgui-table-searchDiv .ant-select-selection:focus,
67
+ .xgui-table-searchDiv .ant-select-selection:hover {
68
+ border: none;
69
+ outline: none;
70
+ box-shadow: none;
71
+ }
72
+
73
+ .select_state {
74
+ display: inline-block;
75
+ .ant-select-selection,
76
+ .ant-select-selection:active,
77
+ .ant-select-selection:focus,
78
+ .ant-select-selection:hover {
79
+ border: 1px solid #d9d9d9;
80
+ }
81
+ }
82
+
83
+ .ky-nhTable-tips-div {
84
+ display: flex;
85
+ align-items: center;
86
+ width: 100%;
87
+ height: 36px;
88
+ margin-bottom: 12px;
89
+ padding-left: 12px;
90
+ color: #565c5f;
91
+ font-size: 12px;
92
+ line-height: 36px;
93
+ background-color: #e6f7ff;
94
+ border: 1px solid #91d5ff;
95
+ border-radius: 3px;
96
+ i {
97
+ margin-right: 5px;
98
+ color: #1890ff;
99
+ font-size: 14px;
100
+ }
101
+ }
102
+
103
+ /* 解决学工UI NHTableNew样式冲突 */
104
+ .ky-nhTable .ant-table-fixed-header .ant-table-scroll .ant-table-header {
105
+ margin-bottom: 0px !important;
106
+ overflow: hidden !important;
107
+ }
108
+ /* 科研table的基础样式 */
109
+ .ky-nhTable {
110
+ /* 新版优化---start */
111
+ /*列表TD内部空白变小一点*/
112
+ .ant-table-small
113
+ > .ant-table-content
114
+ > .ant-table-scroll
115
+ > .ant-table-header
116
+ > table
117
+ > .ant-table-thead
118
+ > tr
119
+ > th {
120
+ height: 44px;
121
+ padding: 0 8px;
122
+ line-height: 39px;
123
+ // padding: 9px 8px;
124
+ }
125
+ .ant-table-small
126
+ > .ant-table-content
127
+ > .ant-table-scroll
128
+ > .ant-table-body
129
+ > table
130
+ > .ant-table-tbody
131
+ > tr
132
+ > td {
133
+ padding: 8px;
134
+ // padding: 5px 8px;
135
+ }
136
+ .ant-table-small
137
+ > .ant-table-content
138
+ > .ant-table-fixed-left
139
+ > .ant-table-header
140
+ > table
141
+ > .ant-table-thead
142
+ > tr
143
+ > th {
144
+ height: 44px;
145
+ padding: 0 8px;
146
+ line-height: 39px;
147
+ // padding: 9px 8px;
148
+ }
149
+ .ant-table-small
150
+ > .ant-table-content
151
+ > .ant-table-fixed-left
152
+ > .ant-table-body-outer
153
+ > .ant-table-body-inner
154
+ > table
155
+ > .ant-table-tbody
156
+ > tr
157
+ > td {
158
+ padding: 8px;
159
+ // padding: 5px 8px;
160
+ }
161
+ .ant-table-small
162
+ > .ant-table-content
163
+ > .ant-table-fixed-right
164
+ > .ant-table-header
165
+ > table
166
+ > .ant-table-thead
167
+ > tr
168
+ > th {
169
+ height: 44px;
170
+ padding: 0 8px;
171
+ line-height: 39px;
172
+ // padding: 9px 8px;
173
+ }
174
+ .ant-table-small
175
+ > .ant-table-content
176
+ > .ant-table-fixed-right
177
+ > .ant-table-body-outer
178
+ > .ant-table-body-inner
179
+ > table
180
+ > .ant-table-tbody
181
+ > tr
182
+ > td {
183
+ padding: 8px;
184
+ // padding: 5px 8px;
185
+ }
186
+ /* 新版优化---end */
187
+ .ant-table-small
188
+ > .ant-table-content
189
+ > .ant-table-scroll
190
+ > .ant-table-body
191
+ > table
192
+ > .ant-table-thead
193
+ > tr
194
+ > th {
195
+ height: 44px;
196
+ }
197
+ .ant-table-small > .ant-table-content .ant-table-header {
198
+ background-color: #f5f5f5;
199
+ }
200
+ .ant-table-fixed-header .ant-table-body-inner {
201
+ overflow-y: auto !important;
202
+ }
203
+ .ant-table-small.ant-table-bordered .ant-table-fixed-right {
204
+ border-left: none;
205
+ }
206
+ .ant-table-small > .ant-table-content > .ant-table-body {
207
+ margin: 0;
208
+ }
209
+ .ant-table-fixed-left
210
+ > .ant-table-body-outer
211
+ > .ant-table-body-inner
212
+ > table
213
+ > .ant-table-tbody
214
+ > tr
215
+ > td {
216
+ max-width: 200px;
217
+ }
218
+ /* 更改分页组件样式 */
219
+ .ant-table-pagination.ant-pagination {
220
+ width: 100%;
221
+ margin: 10px 0;
222
+ text-align: right;
223
+ }
224
+ .ant-pagination-total-text {
225
+ position: absolute;
226
+ left: 0;
227
+ }
228
+ // 重写滚动条样式
229
+ // ::-webkit-scrollbar {
230
+ // position: absolute;
231
+ // right: 0;
232
+ // display: block;
233
+ // // 滚动条整体样式
234
+ // width: 17px;
235
+ // // 高宽分别对应横竖滚动条的尺寸
236
+ // height: 17px;
237
+ // line-height: 17px;
238
+ // }
239
+ /* 滚动条里面小方块 */
240
+ ::-webkit-scrollbar-thumb {
241
+ width: 12px;
242
+ background-color: #dddddd;
243
+ border-radius: 3px;
244
+ }
245
+ /* 滚动条里面轨道 */
246
+ ::-webkit-scrollbar-track {
247
+ position: absolute;
248
+ background: rgba(0, 0, 0, 0);
249
+ border-radius: 3px;
250
+ box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
251
+ }
252
+
253
+ /* 表格无内容时,表头增加滚动条滚动 */
254
+ .showHeaderScroll {
255
+ .ant-table-empty {
256
+ .ant-table-placeholder {
257
+ padding: 0;
258
+ border-top: none;
259
+ }
260
+ .ant-table-hide-scrollbar {
261
+ overflow-y: hidden !important;
262
+ }
263
+ }
264
+ // 兼容火狐
265
+ .ant-table-small.ant-table-empty {
266
+ .ant-table-content {
267
+ .ant-table-header {
268
+ scrollbar-color: auto;
269
+ }
270
+ }
271
+ }
272
+ // 兼容ie
273
+ .ant-table-small.ant-table-empty {
274
+ .ant-table-content {
275
+ .ant-table-scroll {
276
+ .ant-table-body {
277
+ overflow: hidden !important;
278
+ }
279
+ }
280
+ }
281
+ }
282
+ }
283
+ /* 新版新增---end */
284
+ .ant-table-small > .ant-table-content > .ant-table-scroll > .ant-table-header {
285
+ overflow: auto;
286
+ }
287
+ .ant-table-small > .ant-table-content > .ant-table-scroll > .ant-table-body {
288
+ overflow: auto !important;
289
+ }
290
+ .ant-table-small
291
+ > .ant-table-content
292
+ > .ant-table-fixed-right
293
+ > .ant-table-body-outer
294
+ > .ant-table-body-inner {
295
+ margin-top: -2px;
296
+ overflow: auto !important;
297
+ }
298
+ .ant-table-small
299
+ > .ant-table-content
300
+ > .ant-table-fixed-left
301
+ > .ant-table-body-outer
302
+ > .ant-table-body-inner {
303
+ margin-top: -2px;
304
+ overflow: auto !important;
305
+ }
306
+ .ant-table-small
307
+ > .ant-table-content
308
+ > .ant-table-scroll
309
+ > .ant-table-body
310
+ table
311
+ > .ant-table-tbody
312
+ > tr
313
+ > td {
314
+ padding: 5px 8px;
315
+ }
316
+ .ant-table-small
317
+ > .ant-table-content
318
+ > .ant-table-fixed-left
319
+ > .ant-table-body-outer
320
+ > .ant-table-body-inner
321
+ table
322
+ > .ant-table-tbody
323
+ > tr
324
+ > td {
325
+ padding: 5px 8px;
326
+ }
327
+ .ant-table-small
328
+ > .ant-table-content
329
+ > .ant-table-fixed-right
330
+ > .ant-table-body-outer
331
+ > .ant-table-body-inner
332
+ table
333
+ > .ant-table-tbody
334
+ > tr
335
+ > td {
336
+ padding: 5px 8px;
337
+ }
338
+ .ant-table-small > .ant-table-content > .ant-table-fixed-right {
339
+ height: 100%;
340
+ background: white;
341
+ }
342
+ .ant-table-small > .ant-table-content > .ant-table-fixed-left {
343
+ height: 100%;
344
+ }
345
+ .ant-table-small > .ant-table-content > .ant-table-fixed-right > .ant-table-header {
346
+ border-bottom: 1px solid #e8e8e8;
347
+ border-left: 1px solid #e8e8e8;
348
+ }
349
+ .ant-table-small > .ant-table-content > .ant-table-fixed-left > .ant-table-header {
350
+ border-right: 1px solid #e8e8e8;
351
+ border-bottom: 1px solid #e8e8e8;
352
+ border-left: 1px solid #e8e8e8;
353
+ }
354
+ .ant-table-small
355
+ > .ant-table-content
356
+ > .ant-table-fixed-left
357
+ .ant-table-tbody
358
+ > tr
359
+ > td:last-child {
360
+ border-right: 1px solid #e8e8e8 !important;
361
+ }
362
+ .ant-table-small
363
+ > .ant-table-content
364
+ > .ant-table-fixed-left
365
+ > .ant-table-body-outer
366
+ .ant-table-fixed {
367
+ border-right: 1px solid #e8e8e8;
368
+ border-left: 1px solid #e8e8e8;
369
+ }
370
+ .ant-table-small
371
+ > .ant-table-content
372
+ > .ant-table-fixed-left
373
+ .ant-table-tbody
374
+ > tr:first-child
375
+ > td {
376
+ border-top: 1px solid #e8e8e8;
377
+ }
378
+ .ant-table-small
379
+ > .ant-table-content
380
+ > .ant-table-fixed-right
381
+ .ant-table-tbody
382
+ > tr:first-child
383
+ > td {
384
+ border-top: 1px solid #e8e8e8;
385
+ }
386
+ .ant-table-small
387
+ > .ant-table-content
388
+ > .ant-table-fixed-right
389
+ .ant-table-tbody
390
+ > tr
391
+ > td:first-child {
392
+ border-left: 1px solid #e8e8e8 !important;
393
+ }
394
+ /* 调整滚动条的宽度和高度 */
395
+ .ant-table-small
396
+ > .ant-table-content
397
+ > .ant-table-scroll
398
+ > .ant-table-body
399
+ > div
400
+ > div:first-child
401
+ + div {
402
+ z-index: 3;
403
+ height: 12px !important;
404
+ opacity: 1 !important;
405
+ }
406
+ .ant-table-small
407
+ > .ant-table-content
408
+ > .ant-table-scroll
409
+ > .ant-table-body
410
+ > div
411
+ > div:first-child
412
+ + div
413
+ + div {
414
+ z-index: 3;
415
+ width: 12px !important;
416
+ height: auto !important;
417
+ }
418
+ .ant-table-small
419
+ > .ant-table-content
420
+ > .ant-table-fixed-right
421
+ > .ant-table-body-outer
422
+ > .ant-table-body-inner
423
+ > div
424
+ > div:first-child
425
+ + div
426
+ + div {
427
+ display: none;
428
+ }
429
+ .ant-table-scroll table .ant-table-fixed-columns-in-body {
430
+ visibility: visible !important;
431
+ }
432
+ .check button {
433
+ min-width: 60px;
434
+ height: 28px;
435
+ padding: 0 8px;
436
+ line-height: 28px;
437
+ border-color: transparent;
438
+ border-radius: 4px;
439
+ }
440
+ .check button:hover {
441
+ background-color: #fff;
442
+ border-color: #1890ff;
443
+ }
444
+ .check button:global(.ant-btn-primary) {
445
+ color: #1890ff;
446
+ background-color: #e6f7ff;
447
+ border-color: #e6f7ff;
448
+ }
449
+ .check button:global {
450
+ min-width: 90px;
451
+ margin: 0 8px 8px 0;
452
+ padding: 0 12px;
453
+ border-radius: 0px;
454
+ }
455
+ }
456
+ .textOverFlow {
457
+ position: relative;
458
+ overflow: hidden;
459
+ line-height: normal;
460
+ text-overflow: ellipsis;
461
+ }
462
+ /* react-resizable的样式,缺少的话会不显示拖动按钮 */
463
+ .react-resizable {
464
+ position: relative;
465
+ }
466
+ .react-resizable-handle {
467
+ position: absolute;
468
+ box-sizing: border-box;
469
+ width: 20px;
470
+ height: 100%;
471
+ padding: 0 3px 3px 0;
472
+ background-repeat: no-repeat;
473
+ /* background-image: url( data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2IDYiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iNnB4Ij48ZyBvcGFjaXR5PSIwLjMwMiI+PHBhdGggZD0iTSA2IDYgTCAwIDYgTCAwIDQuMiBMIDQgNC4yIEwgNC4yIDQuMiBMIDQuMiAwIEwgNiAwIEwgNiA2IEwgNiA2IFoiIGZpbGw9IiMwMDAwMDAiLz48L2c+PC9zdmc+ ); */
474
+ background-position: bottom right;
475
+ background-origin: content-box;
476
+ cursor: col-resize;
477
+ }
478
+ .react-resizable-handle-sw {
479
+ bottom: 0;
480
+ left: 0;
481
+ // cursor: sw-resize;
482
+ transform: rotate(90deg);
483
+ cursor: col-resize;
484
+ }
485
+ .react-resizable-handle-se {
486
+ right: 0;
487
+ bottom: 0;
488
+ cursor: col-resize;
489
+ // 这是当前使用的光标
490
+ }
491
+ .react-resizable-handle-nw {
492
+ top: 0;
493
+ left: 0;
494
+ transform: rotate(180deg);
495
+ cursor: col-resize;
496
+ }
497
+ .react-resizable-handle-ne {
498
+ top: 0;
499
+ right: 0;
500
+ // cursor: ne-resize;
501
+ transform: rotate(270deg);
502
+ cursor: col-resize;
503
+ }
504
+ .react-resizable-handle-w,
505
+ .react-resizable-handle-e {
506
+ top: 50%;
507
+ margin-top: -10px;
508
+ cursor: col-resize;
509
+ }
510
+ .react-resizable-handle-w {
511
+ left: 0;
512
+ transform: rotate(135deg);
513
+ }
514
+ .react-resizable-handle-e {
515
+ right: 0;
516
+ transform: rotate(315deg);
517
+ }
518
+ .react-resizable-handle-n,
519
+ .react-resizable-handle-s {
520
+ left: 50%;
521
+ margin-left: -10px;
522
+ cursor: col-resize;
523
+ }
524
+ .react-resizable-handle-n {
525
+ top: 0;
526
+ transform: rotate(225deg);
527
+ }
528
+ .react-resizable-handle-s {
529
+ bottom: 0;
530
+ transform: rotate(45deg);
531
+ }
532
+ /* react-resizable的样式,缺少的话会不显示拖动按钮 */
533
+
534
+ // todo:测试
535
+ /* 新版新增---start */
536
+ .ant-table-thead > tr > th,
537
+ .ant-table-tbody > tr > td,
538
+ .ant-table-thead > tr {
539
+ // height: 36px;
540
+ // min-height: 30px !important;
541
+ white-space: nowrap;
542
+ }
543
+ .ant-table-thead > tr {
544
+ background: #f5f5f5 !important;
545
+ }
546
+ .ant-table-thead > tr > th {
547
+ font-weight: 400;
548
+ font-size: 14px;
549
+ font-family: Source Han Sans CN, Source Han Sans CN-Bold;
550
+ }
551
+ .ant-table-tbody > tr:nth-of-type(2n) {
552
+ background: #f9fbfe;
553
+ }
554
+ // 复选框选择列宽度
555
+ .ant-table-tbody > tr > .ant-table-selection-column {
556
+ width: 60px;
557
+ }
558
+ }
@@ -0,0 +1,39 @@
1
+ :global {
2
+ .KyTitle {
3
+ display: flex;
4
+ justify-content: space-between;
5
+ height: 38px;
6
+ margin-bottom: 16px;
7
+ padding: 0 16px;
8
+ color: rgba(0, 0, 0, 0.85);
9
+ background: #f9fbfe;
10
+ border-radius: 4px;
11
+ .title {
12
+ position: relative;
13
+ left: 8px;
14
+ font-weight: bold;
15
+ font-size: 16px;
16
+ line-height: 38px;
17
+
18
+ &::before {
19
+ // position: absolute;
20
+ // bottom: 12px;
21
+ // left: -10px;
22
+ display: inline-block;
23
+ width: 3px;
24
+ height: 14px;
25
+ margin-right: 8px;
26
+ background: #397ef0;
27
+ border-radius: 3px;
28
+ opacity: 1;
29
+ content: ' ';
30
+ }
31
+ }
32
+ .rightBtn {
33
+ color: #397ef0;
34
+ font-size: 14px;
35
+ line-height: 38px;
36
+ cursor: pointer;
37
+ }
38
+ }
39
+ }
Binary file