@bit-sun/business-component 2.2.2 → 2.2.3

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 (176) hide show
  1. package/.editorconfig +16 -16
  2. package/.fatherrc.ts +5 -5
  3. package/.gitlab-ci.yml +179 -179
  4. package/.prettierignore +7 -7
  5. package/.prettierrc +11 -11
  6. package/.umirc.ts +74 -74
  7. package/README.md +27 -27
  8. package/dist/index.esm.js +4 -4
  9. package/dist/index.js +4 -4
  10. package/docs/index.md +21 -21
  11. package/lib/assets/drag.svg +17 -17
  12. package/lib/assets/exportFail.svg +37 -37
  13. package/lib/assets/exportProcessing.svg +28 -28
  14. package/lib/assets/exportSuccess.svg +34 -34
  15. package/lib/assets/label_icon_bottom.svg +25 -25
  16. package/lib/assets/upExport.svg +22 -22
  17. package/package.json +77 -77
  18. package/src/assets/32.svg +27 -27
  19. package/src/assets/addIcon.svg +17 -17
  20. package/src/assets/allfunc.svg +27 -27
  21. package/src/assets/arrowRight.svg +24 -24
  22. package/src/assets/btn-delete.svg +29 -29
  23. package/src/assets/btn-edit.svg +19 -19
  24. package/src/assets/btn-more.svg +17 -17
  25. package/src/assets/btn-submit.svg +19 -19
  26. package/src/assets/caidan.svg +11 -11
  27. package/src/assets/close.svg +26 -26
  28. package/src/assets/drag.svg +17 -17
  29. package/src/assets/exportFail.svg +37 -37
  30. package/src/assets/exportProcessing.svg +28 -28
  31. package/src/assets/exportSuccess.svg +34 -34
  32. package/src/assets/fixed-left-active.svg +11 -11
  33. package/src/assets/fixed-left.svg +15 -15
  34. package/src/assets/fixed-right-active.svg +11 -11
  35. package/src/assets/fixed-right.svg +15 -15
  36. package/src/assets/guanbi.svg +15 -15
  37. package/src/assets/icon-quanping.svg +15 -15
  38. package/src/assets/icon-shezhi.svg +17 -17
  39. package/src/assets/label_icon_bottom.svg +25 -25
  40. package/src/assets/list-no-img.svg +21 -21
  41. package/src/assets/morentouxiang-32.svg +23 -23
  42. package/src/assets/scanning.svg +24 -24
  43. package/src/assets/upExport.svg +22 -22
  44. package/src/components/Business/AddSelectBusiness/index.md +63 -63
  45. package/src/components/Business/AddSelectBusiness/index.tsx +344 -344
  46. package/src/components/Business/BsLayouts/Components/AllFunc/drawContent.tsx +111 -111
  47. package/src/components/Business/BsLayouts/Components/AllFunc/index.less +153 -153
  48. package/src/components/Business/BsLayouts/Components/AllFunc/index.tsx +70 -70
  49. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.less +90 -90
  50. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.tsx +37 -37
  51. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/leftTree.tsx +242 -242
  52. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/rightTree.tsx +384 -384
  53. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/DrawContent.tsx +285 -285
  54. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/customMenuHeader.tsx +74 -74
  55. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/drawContent.less +170 -170
  56. package/src/components/Business/BsLayouts/Components/CustomerMenu/index.less +64 -64
  57. package/src/components/Business/BsLayouts/Components/CustomerMenu/index.tsx +153 -153
  58. package/src/components/Business/BsLayouts/Components/GlobalHeader/index.less +72 -72
  59. package/src/components/Business/BsLayouts/Components/GlobalHeader/index.tsx +157 -157
  60. package/src/components/Business/BsLayouts/Components/RightContent/LoginModal.tsx +85 -85
  61. package/src/components/Business/BsLayouts/Components/RightContent/home.less +218 -218
  62. package/src/components/Business/BsLayouts/Components/RightContent/index.tsx +156 -156
  63. package/src/components/Business/BsLayouts/Components/SearchFunc/index.less +160 -160
  64. package/src/components/Business/BsLayouts/Components/SearchFunc/index.tsx +75 -75
  65. package/src/components/Business/BsLayouts/index.less +79 -79
  66. package/src/components/Business/BsLayouts/index.tsx +1479 -1479
  67. package/src/components/Business/BsLayouts/service.ts +10 -10
  68. package/src/components/Business/BsLayouts/utils.tsx +230 -230
  69. package/src/components/Business/BsSulaQueryTable/index.less +219 -219
  70. package/src/components/Business/BsSulaQueryTable/index.tsx +480 -480
  71. package/src/components/Business/BsSulaQueryTable/setting.tsx +802 -802
  72. package/src/components/Business/BsSulaQueryTable/utils.less +65 -65
  73. package/src/components/Business/BsSulaQueryTable/utils.tsx +688 -688
  74. package/src/components/Business/CommodityEntry/index.md +70 -70
  75. package/src/components/Business/CommodityEntry/index.tsx +80 -80
  76. package/src/components/Business/CommonAlert/index.tsx +23 -23
  77. package/src/components/Business/CommonGuideWrapper/index.less +111 -111
  78. package/src/components/Business/CommonGuideWrapper/index.md +39 -39
  79. package/src/components/Business/CommonGuideWrapper/index.tsx +83 -83
  80. package/src/components/Business/DetailPageWrapper/index.less +79 -79
  81. package/src/components/Business/DetailPageWrapper/index.tsx +335 -335
  82. package/src/components/Business/DetailPageWrapper/utils.tsx +100 -100
  83. package/src/components/Business/HomePageWrapper/index.less +33 -33
  84. package/src/components/Business/HomePageWrapper/index.md +45 -45
  85. package/src/components/Business/HomePageWrapper/index.tsx +162 -162
  86. package/src/components/Business/JsonQueryTable/components/FieldsModifyModal.tsx +824 -824
  87. package/src/components/Business/JsonQueryTable/components/FieldsSettingsTable.tsx +201 -201
  88. package/src/components/Business/JsonQueryTable/components/Formula.tsx +205 -205
  89. package/src/components/Business/JsonQueryTable/components/MaintainOptions.tsx +127 -127
  90. package/src/components/Business/JsonQueryTable/configButton/index.js +20 -20
  91. package/src/components/Business/JsonQueryTable/configTree/component/compactArrayView.js +25 -25
  92. package/src/components/Business/JsonQueryTable/configTree/component/compactObjectView.js +30 -30
  93. package/src/components/Business/JsonQueryTable/configTree/index.js +82 -82
  94. package/src/components/Business/JsonQueryTable/configTree/index.less +44 -44
  95. package/src/components/Business/JsonQueryTable/configTree/parser/highlight.js +57 -57
  96. package/src/components/Business/JsonQueryTable/configTree/parser/index.js +124 -124
  97. package/src/components/Business/JsonQueryTable/configTree/render/iconRender.js +29 -29
  98. package/src/components/Business/JsonQueryTable/configTree/render/nameRender.js +22 -22
  99. package/src/components/Business/JsonQueryTable/configTree/treeNode.js +116 -116
  100. package/src/components/Business/JsonQueryTable/drawer/index.tsx +12 -12
  101. package/src/components/Business/JsonQueryTable/function.ts +62 -62
  102. package/src/components/Business/JsonQueryTable/index.less +16 -16
  103. package/src/components/Business/JsonQueryTable/index.md +328 -328
  104. package/src/components/Business/JsonQueryTable/index.tsx +320 -320
  105. package/src/components/Business/JsonQueryTable/jsonEditor/index.js +346 -346
  106. package/src/components/Business/JsonQueryTable/jsonEditor/index.less +22 -22
  107. package/src/components/Business/JsonQueryTable/jsonEditor/lint/basicType.js +147 -147
  108. package/src/components/Business/JsonQueryTable/jsonEditor/lint/index.js +389 -389
  109. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/actions.js +118 -118
  110. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/dependency.js +22 -22
  111. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/index.js +21 -21
  112. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/request.js +65 -65
  113. package/src/components/Business/JsonQueryTable/static.ts +356 -356
  114. package/src/components/Business/SearchSelect/BusinessUtils.ts +1586 -1586
  115. package/src/components/Business/SearchSelect/common.ts +53 -53
  116. package/src/components/Business/SearchSelect/index.md +1254 -1254
  117. package/src/components/Business/SearchSelect/index.tsx +51 -51
  118. package/src/components/Business/SearchSelect/utils.ts +100 -100
  119. package/src/components/Business/StateFlow/index.less +130 -130
  120. package/src/components/Business/StateFlow/index.md +60 -60
  121. package/src/components/Business/StateFlow/index.tsx +29 -29
  122. package/src/components/Business/TreeSearchSelect/index.md +126 -126
  123. package/src/components/Business/TreeSearchSelect/index.tsx +34 -34
  124. package/src/components/Business/TreeSearchSelect/utils.ts +60 -60
  125. package/src/components/Business/columnSettingTable/columnSetting.tsx +764 -764
  126. package/src/components/Business/columnSettingTable/index.less +247 -247
  127. package/src/components/Business/columnSettingTable/index.md +357 -357
  128. package/src/components/Business/columnSettingTable/index.tsx +232 -232
  129. package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +240 -240
  130. package/src/components/Business/columnSettingTable/utils.tsx +68 -68
  131. package/src/components/Business/moreTreeTable/index.less +99 -99
  132. package/src/components/Business/moreTreeTable/index.md +508 -508
  133. package/src/components/Business/moreTreeTable/index.tsx +315 -315
  134. package/src/components/Business/moreTreeTable/utils.ts +126 -126
  135. package/src/components/Functional/AddSelect/index.less +367 -367
  136. package/src/components/Functional/AddSelect/index.md +155 -155
  137. package/src/components/Functional/AddSelect/index.tsx +1072 -1072
  138. package/src/components/Functional/BillEntry/index.less +371 -371
  139. package/src/components/Functional/BillEntry/index.md +39 -39
  140. package/src/components/Functional/BillEntry/index.tsx +766 -766
  141. package/src/components/Functional/DataImport/index.less +63 -63
  142. package/src/components/Functional/DataImport/index.md +44 -44
  143. package/src/components/Functional/DataImport/index.tsx +695 -695
  144. package/src/components/Functional/DataValidation/index.less +63 -63
  145. package/src/components/Functional/DataValidation/index.md +39 -39
  146. package/src/components/Functional/DataValidation/index.tsx +687 -687
  147. package/src/components/Functional/ExportFunctions/ExportIcon/index.md +37 -37
  148. package/src/components/Functional/ExportFunctions/ExportIcon/index.tsx +59 -59
  149. package/src/components/Functional/QueryMutipleInput/index.less +37 -37
  150. package/src/components/Functional/QueryMutipleInput/index.md +33 -33
  151. package/src/components/Functional/QueryMutipleInput/index.tsx +128 -128
  152. package/src/components/Functional/SearchSelect/index.less +115 -115
  153. package/src/components/Functional/SearchSelect/index.md +141 -141
  154. package/src/components/Functional/SearchSelect/index.tsx +813 -813
  155. package/src/components/Functional/SearchSelect/utils.ts +3 -3
  156. package/src/components/Functional/TreeSearchSelect/index.md +47 -47
  157. package/src/components/Functional/TreeSearchSelect/index.tsx +149 -149
  158. package/src/index.ts +34 -34
  159. package/src/plugin/TableColumnSetting/index.less +247 -247
  160. package/src/plugin/TableColumnSetting/index.md +50 -50
  161. package/src/plugin/TableColumnSetting/index.tsx +724 -724
  162. package/src/plugin/TableColumnSetting/utils.ts +19 -19
  163. package/src/styles/bsDefault.less +1906 -1906
  164. package/src/utils/CheckOneUser/index.md +39 -39
  165. package/src/utils/CheckOneUser/index.ts +51 -51
  166. package/src/utils/LocalstorageUtils.ts +33 -33
  167. package/src/utils/TableUtils.tsx +18 -18
  168. package/src/utils/checkUtils.ts +39 -39
  169. package/src/utils/enumConfig.ts +10 -10
  170. package/src/utils/getFormMode.js +12 -12
  171. package/src/utils/index.ts +2 -2
  172. package/src/utils/requestUtils.ts +33 -33
  173. package/src/utils/serialize.js +7 -7
  174. package/src/utils/utils.ts +183 -183
  175. package/tsconfig.json +29 -29
  176. package/typings.d.ts +4 -4
@@ -1,508 +1,508 @@
1
- ---
2
- nav:
3
- title: '组件'
4
- order: 1
5
- group:
6
- title: 业务组件
7
- order: 1
8
- title: 多表头表格
9
- order: 1
10
- ---
11
-
12
- # MoreTreeTable
13
-
14
-
15
- ## 纵向表头表格
16
-
17
- ```tsx
18
- import { MoreTreeTable } from '../../../index.ts';
19
- import React, { useState, useRef } from 'react';
20
-
21
- export default () => {
22
- const colTableRef = useRef(null);
23
- const data = {
24
- colHead: [
25
- {
26
- key: 'fixed1',
27
- title: '固定列1',
28
- fixed: true,
29
- },
30
- {
31
- key: 'fixed2',
32
- title: '固定列2',
33
- fixed: true,
34
- },
35
- {
36
- key: '1111',
37
- title: '测试1',
38
- children: [
39
- {
40
- key: '1111-1',
41
- title: '测试1-1',
42
- children: [
43
- {
44
- key: '1111-1-2',
45
- title: '测试1-1-2',
46
- },
47
- {
48
- key: '1111-1-3',
49
- title: '测试1-1-4',
50
- },
51
- ],
52
- },
53
- {
54
- key: '1111-2',
55
- title: '测试1-2',
56
- children: [
57
- {
58
- key: '1111-2-2',
59
- title: '测试1-2-2',
60
- },
61
- {
62
- key: '1111-2-3',
63
- title: '测试1-2-4',
64
- },
65
- ],
66
- },
67
- {
68
- key: '1111-3',
69
- title: '测试1-3',
70
- children: [
71
- {
72
- key: '1111-3-2',
73
- title: '测试1-3-2',
74
- },
75
- {
76
- key: '1111-3-3',
77
- title: '测试1-3-4',
78
- },
79
- ],
80
- },
81
- {
82
- key: '1111-4',
83
- title: '测试1-4',
84
- },
85
- ],
86
- },
87
- {
88
- key: '2222',
89
- title: '测试1',
90
- children: [
91
- {
92
- key: '2222-1',
93
- title: '测试1-1',
94
- children: [
95
- {
96
- key: '2222-1-2',
97
- title: '测试1-1-2',
98
- },
99
- {
100
- key: '2222-1-3',
101
- title: '测试1-1-4',
102
- },
103
- ],
104
- },
105
- {
106
- key: '2222-2',
107
- title: '测试1-2',
108
- children: [
109
- {
110
- key: '2222-2-2',
111
- title: '测试1-2-2',
112
- },
113
- {
114
- key: '2222-2-3',
115
- title: '测试1-2-4',
116
- children: [
117
- {
118
- key: '2222-2-3-1',
119
- title: '测试1-2-2',
120
- },
121
- {
122
- key: '2222-2-3-2',
123
- title: '测试1-2-2',
124
- },
125
- ],
126
- },
127
- ],
128
- },
129
- {
130
- key: '2222-3',
131
- title: '测试1-3',
132
- children: [
133
- {
134
- key: '2222-3-2',
135
- title: '测试1-3-2',
136
- },
137
- {
138
- key: '2222-3-3',
139
- title: '测试1-3-4',
140
- },
141
- ],
142
- },
143
- {
144
- key: '2222-4',
145
- title: '测试1-4',
146
- },
147
- ],
148
- },
149
- ],
150
- //纵向表头数据
151
- tableValue2: [
152
- {
153
- '1111-1-2': '1',
154
- '1111-1-3': '2',
155
- '1111-2-2': '3',
156
- '1111-2-3': '4',
157
- '1111-3-2': '5',
158
- '2222-3-3': '6',
159
- '2222-4': '7',
160
- 'fixed1': '标题1',
161
- 'fixed2': '标题1-1',
162
- },
163
- {
164
- '1111-1-2': '1',
165
- '1111-1-3': '2',
166
- '1111-2-2': '3',
167
- '1111-2-3': '4',
168
- '1111-3-2': '5',
169
- '2222-3-3': '6',
170
- '2222-4': '7',
171
- 'fixed1': '标题1',
172
- 'fixed2': '标题1-2',
173
- },
174
- {
175
- '1111-1-2': '1',
176
- '1111-1-3': '2',
177
- '1111-2-2': '3',
178
- '1111-2-3': '4',
179
- '1111-3-2': '5',
180
- '2222-3-3': '6',
181
- '2222-4': '7',
182
- 'fixed1': '标题1',
183
- 'fixed2': '标题1-3',
184
- },
185
- {
186
- '1111-1-2': '1',
187
- '1111-1-3': '2',
188
- '1111-2-2': '3',
189
- '1111-2-3': '4',
190
- '1111-3-2': '5',
191
- '2222-3-3': '6',
192
- '2222-4': '7',
193
- 'fixed1': '标题1',
194
- 'fixed2': '标题1-4',
195
- },
196
- {
197
- '1111-1-2': '1',
198
- '1111-1-3': '2',
199
- '1111-2-2': '3',
200
- '1111-2-3': '4',
201
- '1111-3-2': '5',
202
- '2222-3-3': '6',
203
- '2222-4': '7',
204
- 'fixed1': '标题1',
205
- 'fixed2': '标题1-5',
206
- },
207
- {
208
- 'fixed1': '标题2',
209
- 'fixed2': '标题2-1',
210
- },
211
- {
212
- 'fixed1': '标题2',
213
- 'fixed2': '标题2-2',
214
- },
215
- {
216
- 'fixed1': '标题2',
217
- 'fixed2': '标题2-3',
218
- },
219
- {
220
- 'fixed1': '标题2',
221
- 'fixed2': '标题2-4',
222
- },
223
- {
224
- 'fixed1': '标题2',
225
- 'fixed2': '标题2-5',
226
- },
227
- {
228
- 'fixed1': '标题2',
229
- 'fixed2': '标题2-6',
230
- },
231
- {
232
- 'fixed1': '标题2',
233
- 'fixed2': '标题2-7',
234
- },
235
- {
236
- 'fixed1': '标题2',
237
- 'fixed2': '标题2-8',
238
- },
239
- ],
240
- };
241
- return (
242
- <MoreTreeTable
243
- height={500}
244
- colData={data.colHead}
245
- colTableData={data.tableValue2}
246
- colHeaderWidth={400}
247
- ref={colTableRef}
248
- />
249
- );
250
- };
251
- ```
252
-
253
- ## 多表头表格
254
-
255
- ```tsx
256
- import { MoreTreeTable } from '../../../index.ts';
257
- import React, { useState, useRef } from 'react';
258
-
259
- export default () => {
260
- const colTableRef = useRef(null);
261
- const data = {
262
- rowHead: [
263
- {
264
- key: '1111',
265
- title: '测试1',
266
- children: [
267
- {
268
- key: '1111-1',
269
- title: '测试1-1',
270
- children: [
271
- {
272
- key: '1111-1-2',
273
- title: '测试1-1-2',
274
- },
275
- {
276
- key: '1111-1-3',
277
- title: '测试1-1-4',
278
- },
279
- ],
280
- },
281
- {
282
- key: '1111-2',
283
- title: '测试1-2',
284
- children: [
285
- {
286
- id: '1111-2-2',
287
- title: '测试1-2-2',
288
- },
289
- {
290
- id: '1111-2-3',
291
- title: '测试1-2-4',
292
- },
293
- ],
294
- },
295
- {
296
- key: '1111-3',
297
- title: '测试1-3',
298
- children: [
299
- {
300
- key: '1111-3-2',
301
- title: '测试1-3-2',
302
- },
303
- {
304
- key: '1111-3-3',
305
- title: '测试1-3-4',
306
- },
307
- ],
308
- },
309
- {
310
- key: '1111-4',
311
- title: '测试1-4',
312
- },
313
- ],
314
- },
315
- {
316
- key: '2222',
317
- title: '测试1',
318
- children: [
319
- {
320
- key: '2222-1',
321
- title: '测试1-1',
322
- children: [
323
- {
324
- key: '2222-1-2',
325
- title: '测试1-1-2',
326
- },
327
- {
328
- key: '2222-1-3',
329
- title: '测试1-1-4',
330
- },
331
- ],
332
- },
333
- {
334
- key: '2222-2',
335
- title: '测试1-2',
336
- children: [
337
- {
338
- key: '2222-2-2',
339
- title: '测试1-2-2',
340
- },
341
- {
342
- key: '2222-2-3',
343
- title: '测试1-2-4',
344
- },
345
- ],
346
- },
347
- {
348
- key: '2222-3',
349
- title: '测试1-3',
350
- children: [
351
- {
352
- key: '2222-3-2',
353
- title: '测试1-3-2',
354
- },
355
- {
356
- key: '2222-3-3',
357
- title: '测试1-3-4',
358
- },
359
- ],
360
- },
361
- {
362
- key: '2222-4',
363
- title: '测试1-4',
364
- },
365
- ],
366
- },
367
- ],
368
- colHead: [
369
- {
370
- key: '1111',
371
- title: '测试1',
372
- children: [
373
- {
374
- key: '1111-1',
375
- title: '测试1-1',
376
- children: [
377
- {
378
- key: '1111-1-2',
379
- title: '测试1-1-2',
380
- },
381
- {
382
- key: '1111-1-3',
383
- title: '测试1-1-4',
384
- },
385
- ],
386
- },
387
- {
388
- key: '1111-2',
389
- title: '测试1-2',
390
- children: [
391
- {
392
- key: '1111-2-2',
393
- title: '测试1-2-2',
394
- },
395
- {
396
- key: '1111-2-3',
397
- title: '测试1-2-4',
398
- },
399
- ],
400
- },
401
- {
402
- key: '1111-3',
403
- title: '测试1-3',
404
- children: [
405
- {
406
- key: '1111-3-2',
407
- title: '测试1-3-2',
408
- },
409
- {
410
- key: '1111-3-3',
411
- title: '测试1-3-4',
412
- },
413
- ],
414
- },
415
- {
416
- key: '1111-4',
417
- title: '测试1-4',
418
- },
419
- ],
420
- },
421
- {
422
- key: '2222',
423
- title: '测试1',
424
- children: [
425
- {
426
- key: '2222-1',
427
- title: '测试1-1',
428
- children: [
429
- {
430
- key: '2222-1-2',
431
- title: '测试1-1-2',
432
- },
433
- {
434
- key: '2222-1-3',
435
- title: '测试1-1-4',
436
- },
437
- ],
438
- },
439
- {
440
- key: '2222-2',
441
- title: '测试1-2',
442
- children: [
443
- {
444
- key: '2222-2-2',
445
- title: '测试1-2-2',
446
- },
447
- {
448
- key: '2222-2-3',
449
- title: '测试1-2-4',
450
- children: [
451
- {
452
- key: '2222-2-3-1',
453
- title: '测试1-2-2',
454
- },
455
- {
456
- key: '2222-2-3-2',
457
- title: '测试1-2-2',
458
- },
459
- ],
460
- },
461
- ],
462
- },
463
- {
464
- key: '2222-3',
465
- title: '测试1-3',
466
- children: [
467
- {
468
- key: '2222-3-2',
469
- title: '测试1-3-2',
470
- },
471
- {
472
- key: '2222-3-3',
473
- title: '测试1-3-4',
474
- },
475
- ],
476
- },
477
- {
478
- key: '2222-4',
479
- title: '测试1-4',
480
- },
481
- ],
482
- },
483
- ],
484
- //多项表头的数据
485
- tableValue1: {
486
- '1111-1-2__1111-1-2': '测试数据1',
487
- '1111-1-3__1111-1-3': '测试数据2',
488
- '1111-2-2__1111-2-2': '测试数据3',
489
- '1111-2-3__1111-2-3': '测试数据4',
490
- '1111-3-2__1111-3-2': '测试数据5',
491
- '2222-3-3__2222-3-3': '测试数据6',
492
- '2222-4__2222-4': '测试数据7',
493
- },
494
- };
495
- return (
496
- <MoreTreeTable
497
- // width={1000}
498
- height={500}
499
- colData={data.colHead}
500
- rowData={data.rowHead}
501
- multiTableData={data.tableValue1}
502
- colTableData={data.tableValue2}
503
- colHeaderWidth={400}
504
- ref={colTableRef}
505
- />
506
- );
507
- };
508
- ```
1
+ ---
2
+ nav:
3
+ title: '组件'
4
+ order: 1
5
+ group:
6
+ title: 业务组件
7
+ order: 1
8
+ title: 多表头表格
9
+ order: 1
10
+ ---
11
+
12
+ # MoreTreeTable
13
+
14
+
15
+ ## 纵向表头表格
16
+
17
+ ```tsx
18
+ import { MoreTreeTable } from '../../../index.ts';
19
+ import React, { useState, useRef } from 'react';
20
+
21
+ export default () => {
22
+ const colTableRef = useRef(null);
23
+ const data = {
24
+ colHead: [
25
+ {
26
+ key: 'fixed1',
27
+ title: '固定列1',
28
+ fixed: true,
29
+ },
30
+ {
31
+ key: 'fixed2',
32
+ title: '固定列2',
33
+ fixed: true,
34
+ },
35
+ {
36
+ key: '1111',
37
+ title: '测试1',
38
+ children: [
39
+ {
40
+ key: '1111-1',
41
+ title: '测试1-1',
42
+ children: [
43
+ {
44
+ key: '1111-1-2',
45
+ title: '测试1-1-2',
46
+ },
47
+ {
48
+ key: '1111-1-3',
49
+ title: '测试1-1-4',
50
+ },
51
+ ],
52
+ },
53
+ {
54
+ key: '1111-2',
55
+ title: '测试1-2',
56
+ children: [
57
+ {
58
+ key: '1111-2-2',
59
+ title: '测试1-2-2',
60
+ },
61
+ {
62
+ key: '1111-2-3',
63
+ title: '测试1-2-4',
64
+ },
65
+ ],
66
+ },
67
+ {
68
+ key: '1111-3',
69
+ title: '测试1-3',
70
+ children: [
71
+ {
72
+ key: '1111-3-2',
73
+ title: '测试1-3-2',
74
+ },
75
+ {
76
+ key: '1111-3-3',
77
+ title: '测试1-3-4',
78
+ },
79
+ ],
80
+ },
81
+ {
82
+ key: '1111-4',
83
+ title: '测试1-4',
84
+ },
85
+ ],
86
+ },
87
+ {
88
+ key: '2222',
89
+ title: '测试1',
90
+ children: [
91
+ {
92
+ key: '2222-1',
93
+ title: '测试1-1',
94
+ children: [
95
+ {
96
+ key: '2222-1-2',
97
+ title: '测试1-1-2',
98
+ },
99
+ {
100
+ key: '2222-1-3',
101
+ title: '测试1-1-4',
102
+ },
103
+ ],
104
+ },
105
+ {
106
+ key: '2222-2',
107
+ title: '测试1-2',
108
+ children: [
109
+ {
110
+ key: '2222-2-2',
111
+ title: '测试1-2-2',
112
+ },
113
+ {
114
+ key: '2222-2-3',
115
+ title: '测试1-2-4',
116
+ children: [
117
+ {
118
+ key: '2222-2-3-1',
119
+ title: '测试1-2-2',
120
+ },
121
+ {
122
+ key: '2222-2-3-2',
123
+ title: '测试1-2-2',
124
+ },
125
+ ],
126
+ },
127
+ ],
128
+ },
129
+ {
130
+ key: '2222-3',
131
+ title: '测试1-3',
132
+ children: [
133
+ {
134
+ key: '2222-3-2',
135
+ title: '测试1-3-2',
136
+ },
137
+ {
138
+ key: '2222-3-3',
139
+ title: '测试1-3-4',
140
+ },
141
+ ],
142
+ },
143
+ {
144
+ key: '2222-4',
145
+ title: '测试1-4',
146
+ },
147
+ ],
148
+ },
149
+ ],
150
+ //纵向表头数据
151
+ tableValue2: [
152
+ {
153
+ '1111-1-2': '1',
154
+ '1111-1-3': '2',
155
+ '1111-2-2': '3',
156
+ '1111-2-3': '4',
157
+ '1111-3-2': '5',
158
+ '2222-3-3': '6',
159
+ '2222-4': '7',
160
+ 'fixed1': '标题1',
161
+ 'fixed2': '标题1-1',
162
+ },
163
+ {
164
+ '1111-1-2': '1',
165
+ '1111-1-3': '2',
166
+ '1111-2-2': '3',
167
+ '1111-2-3': '4',
168
+ '1111-3-2': '5',
169
+ '2222-3-3': '6',
170
+ '2222-4': '7',
171
+ 'fixed1': '标题1',
172
+ 'fixed2': '标题1-2',
173
+ },
174
+ {
175
+ '1111-1-2': '1',
176
+ '1111-1-3': '2',
177
+ '1111-2-2': '3',
178
+ '1111-2-3': '4',
179
+ '1111-3-2': '5',
180
+ '2222-3-3': '6',
181
+ '2222-4': '7',
182
+ 'fixed1': '标题1',
183
+ 'fixed2': '标题1-3',
184
+ },
185
+ {
186
+ '1111-1-2': '1',
187
+ '1111-1-3': '2',
188
+ '1111-2-2': '3',
189
+ '1111-2-3': '4',
190
+ '1111-3-2': '5',
191
+ '2222-3-3': '6',
192
+ '2222-4': '7',
193
+ 'fixed1': '标题1',
194
+ 'fixed2': '标题1-4',
195
+ },
196
+ {
197
+ '1111-1-2': '1',
198
+ '1111-1-3': '2',
199
+ '1111-2-2': '3',
200
+ '1111-2-3': '4',
201
+ '1111-3-2': '5',
202
+ '2222-3-3': '6',
203
+ '2222-4': '7',
204
+ 'fixed1': '标题1',
205
+ 'fixed2': '标题1-5',
206
+ },
207
+ {
208
+ 'fixed1': '标题2',
209
+ 'fixed2': '标题2-1',
210
+ },
211
+ {
212
+ 'fixed1': '标题2',
213
+ 'fixed2': '标题2-2',
214
+ },
215
+ {
216
+ 'fixed1': '标题2',
217
+ 'fixed2': '标题2-3',
218
+ },
219
+ {
220
+ 'fixed1': '标题2',
221
+ 'fixed2': '标题2-4',
222
+ },
223
+ {
224
+ 'fixed1': '标题2',
225
+ 'fixed2': '标题2-5',
226
+ },
227
+ {
228
+ 'fixed1': '标题2',
229
+ 'fixed2': '标题2-6',
230
+ },
231
+ {
232
+ 'fixed1': '标题2',
233
+ 'fixed2': '标题2-7',
234
+ },
235
+ {
236
+ 'fixed1': '标题2',
237
+ 'fixed2': '标题2-8',
238
+ },
239
+ ],
240
+ };
241
+ return (
242
+ <MoreTreeTable
243
+ height={500}
244
+ colData={data.colHead}
245
+ colTableData={data.tableValue2}
246
+ colHeaderWidth={400}
247
+ ref={colTableRef}
248
+ />
249
+ );
250
+ };
251
+ ```
252
+
253
+ ## 多表头表格
254
+
255
+ ```tsx
256
+ import { MoreTreeTable } from '../../../index.ts';
257
+ import React, { useState, useRef } from 'react';
258
+
259
+ export default () => {
260
+ const colTableRef = useRef(null);
261
+ const data = {
262
+ rowHead: [
263
+ {
264
+ key: '1111',
265
+ title: '测试1',
266
+ children: [
267
+ {
268
+ key: '1111-1',
269
+ title: '测试1-1',
270
+ children: [
271
+ {
272
+ key: '1111-1-2',
273
+ title: '测试1-1-2',
274
+ },
275
+ {
276
+ key: '1111-1-3',
277
+ title: '测试1-1-4',
278
+ },
279
+ ],
280
+ },
281
+ {
282
+ key: '1111-2',
283
+ title: '测试1-2',
284
+ children: [
285
+ {
286
+ id: '1111-2-2',
287
+ title: '测试1-2-2',
288
+ },
289
+ {
290
+ id: '1111-2-3',
291
+ title: '测试1-2-4',
292
+ },
293
+ ],
294
+ },
295
+ {
296
+ key: '1111-3',
297
+ title: '测试1-3',
298
+ children: [
299
+ {
300
+ key: '1111-3-2',
301
+ title: '测试1-3-2',
302
+ },
303
+ {
304
+ key: '1111-3-3',
305
+ title: '测试1-3-4',
306
+ },
307
+ ],
308
+ },
309
+ {
310
+ key: '1111-4',
311
+ title: '测试1-4',
312
+ },
313
+ ],
314
+ },
315
+ {
316
+ key: '2222',
317
+ title: '测试1',
318
+ children: [
319
+ {
320
+ key: '2222-1',
321
+ title: '测试1-1',
322
+ children: [
323
+ {
324
+ key: '2222-1-2',
325
+ title: '测试1-1-2',
326
+ },
327
+ {
328
+ key: '2222-1-3',
329
+ title: '测试1-1-4',
330
+ },
331
+ ],
332
+ },
333
+ {
334
+ key: '2222-2',
335
+ title: '测试1-2',
336
+ children: [
337
+ {
338
+ key: '2222-2-2',
339
+ title: '测试1-2-2',
340
+ },
341
+ {
342
+ key: '2222-2-3',
343
+ title: '测试1-2-4',
344
+ },
345
+ ],
346
+ },
347
+ {
348
+ key: '2222-3',
349
+ title: '测试1-3',
350
+ children: [
351
+ {
352
+ key: '2222-3-2',
353
+ title: '测试1-3-2',
354
+ },
355
+ {
356
+ key: '2222-3-3',
357
+ title: '测试1-3-4',
358
+ },
359
+ ],
360
+ },
361
+ {
362
+ key: '2222-4',
363
+ title: '测试1-4',
364
+ },
365
+ ],
366
+ },
367
+ ],
368
+ colHead: [
369
+ {
370
+ key: '1111',
371
+ title: '测试1',
372
+ children: [
373
+ {
374
+ key: '1111-1',
375
+ title: '测试1-1',
376
+ children: [
377
+ {
378
+ key: '1111-1-2',
379
+ title: '测试1-1-2',
380
+ },
381
+ {
382
+ key: '1111-1-3',
383
+ title: '测试1-1-4',
384
+ },
385
+ ],
386
+ },
387
+ {
388
+ key: '1111-2',
389
+ title: '测试1-2',
390
+ children: [
391
+ {
392
+ key: '1111-2-2',
393
+ title: '测试1-2-2',
394
+ },
395
+ {
396
+ key: '1111-2-3',
397
+ title: '测试1-2-4',
398
+ },
399
+ ],
400
+ },
401
+ {
402
+ key: '1111-3',
403
+ title: '测试1-3',
404
+ children: [
405
+ {
406
+ key: '1111-3-2',
407
+ title: '测试1-3-2',
408
+ },
409
+ {
410
+ key: '1111-3-3',
411
+ title: '测试1-3-4',
412
+ },
413
+ ],
414
+ },
415
+ {
416
+ key: '1111-4',
417
+ title: '测试1-4',
418
+ },
419
+ ],
420
+ },
421
+ {
422
+ key: '2222',
423
+ title: '测试1',
424
+ children: [
425
+ {
426
+ key: '2222-1',
427
+ title: '测试1-1',
428
+ children: [
429
+ {
430
+ key: '2222-1-2',
431
+ title: '测试1-1-2',
432
+ },
433
+ {
434
+ key: '2222-1-3',
435
+ title: '测试1-1-4',
436
+ },
437
+ ],
438
+ },
439
+ {
440
+ key: '2222-2',
441
+ title: '测试1-2',
442
+ children: [
443
+ {
444
+ key: '2222-2-2',
445
+ title: '测试1-2-2',
446
+ },
447
+ {
448
+ key: '2222-2-3',
449
+ title: '测试1-2-4',
450
+ children: [
451
+ {
452
+ key: '2222-2-3-1',
453
+ title: '测试1-2-2',
454
+ },
455
+ {
456
+ key: '2222-2-3-2',
457
+ title: '测试1-2-2',
458
+ },
459
+ ],
460
+ },
461
+ ],
462
+ },
463
+ {
464
+ key: '2222-3',
465
+ title: '测试1-3',
466
+ children: [
467
+ {
468
+ key: '2222-3-2',
469
+ title: '测试1-3-2',
470
+ },
471
+ {
472
+ key: '2222-3-3',
473
+ title: '测试1-3-4',
474
+ },
475
+ ],
476
+ },
477
+ {
478
+ key: '2222-4',
479
+ title: '测试1-4',
480
+ },
481
+ ],
482
+ },
483
+ ],
484
+ //多项表头的数据
485
+ tableValue1: {
486
+ '1111-1-2__1111-1-2': '测试数据1',
487
+ '1111-1-3__1111-1-3': '测试数据2',
488
+ '1111-2-2__1111-2-2': '测试数据3',
489
+ '1111-2-3__1111-2-3': '测试数据4',
490
+ '1111-3-2__1111-3-2': '测试数据5',
491
+ '2222-3-3__2222-3-3': '测试数据6',
492
+ '2222-4__2222-4': '测试数据7',
493
+ },
494
+ };
495
+ return (
496
+ <MoreTreeTable
497
+ // width={1000}
498
+ height={500}
499
+ colData={data.colHead}
500
+ rowData={data.rowHead}
501
+ multiTableData={data.tableValue1}
502
+ colTableData={data.tableValue2}
503
+ colHeaderWidth={400}
504
+ ref={colTableRef}
505
+ />
506
+ );
507
+ };
508
+ ```