UNPKG

44 kBJSONView Raw
1{
2 "name": "Table",
3 "props": {
4 "prefix": {
5 "type": {
6 "name": "string"
7 },
8 "required": false,
9 "description": "样式类名的品牌前缀",
10 "defaultValue": {
11 "value": "'next-'",
12 "computed": false
13 },
14 "docblock": "样式类名的品牌前缀"
15 },
16 "tableLayout": {
17 "type": {
18 "name": "enum",
19 "value": [
20 {
21 "value": "'fixed'",
22 "computed": false
23 },
24 {
25 "value": "'auto'",
26 "computed": false
27 }
28 ]
29 },
30 "required": false,
31 "description": "表格元素的 table-layout 属性,设为 fixed 表示内容不会影响列的布局",
32 "docblock": "表格元素的 table-layout 属性,设为 fixed 表示内容不会影响列的布局"
33 },
34 "tableWidth": {
35 "type": {
36 "name": "number"
37 },
38 "required": false,
39 "description": "表格的总长度,可以这么用:设置表格总长度 、设置部分列的宽度,这样表格会按照剩余空间大小,自动其他列分配宽度",
40 "docblock": "表格的总长度,可以这么用:设置表格总长度 、设置部分列的宽度,这样表格会按照剩余空间大小,自动其他列分配宽度"
41 },
42 "className": {
43 "type": {
44 "name": "string"
45 },
46 "required": false,
47 "description": "自定义类名",
48 "docblock": "自定义类名"
49 },
50 "style": {
51 "type": {
52 "name": "object"
53 },
54 "required": false,
55 "description": "自定义内联样式",
56 "docblock": "自定义内联样式",
57 "properties": []
58 },
59 "size": {
60 "type": {
61 "name": "enum",
62 "value": [
63 {
64 "value": "'small'",
65 "computed": false
66 },
67 {
68 "value": "'medium'",
69 "computed": false
70 }
71 ]
72 },
73 "required": false,
74 "description": "尺寸 small为紧凑模式",
75 "defaultValue": {
76 "value": "'medium'",
77 "computed": false
78 },
79 "docblock": "尺寸 small为紧凑模式"
80 },
81 "dataSource": {
82 "type": {
83 "name": "array"
84 },
85 "required": false,
86 "description": "表格展示的数据源",
87 "defaultValue": {
88 "value": "[]",
89 "computed": false
90 },
91 "docblock": "表格展示的数据源"
92 },
93 "onRowClick": {
94 "type": {
95 "name": "func"
96 },
97 "required": false,
98 "description": "点击表格每一行触发的事件",
99 "defaultValue": {
100 "value": "() => {}",
101 "computed": false
102 },
103 "docblock": "点击表格每一行触发的事件\n@param {Object} record 该行所对应的数据\n@param {Number} index 该行所对应的序列\n@param {Event} e DOM事件对象",
104 "params": [
105 {
106 "name": "record",
107 "description": "该行所对应的数据",
108 "type": {
109 "name": "Object"
110 }
111 },
112 {
113 "name": "index",
114 "description": "该行所对应的序列",
115 "type": {
116 "name": "Number"
117 }
118 },
119 {
120 "name": "e",
121 "description": "DOM事件对象",
122 "type": {
123 "name": "Event"
124 }
125 }
126 ],
127 "returns": null
128 },
129 "onRowMouseEnter": {
130 "type": {
131 "name": "func"
132 },
133 "required": false,
134 "description": "悬浮在表格每一行的时候触发的事件",
135 "defaultValue": {
136 "value": "() => {}",
137 "computed": false
138 },
139 "docblock": "悬浮在表格每一行的时候触发的事件\n@param {Object} record 该行所对应的数据\n@param {Number} index 该行所对应的序列\n@param {Event} e DOM事件对象",
140 "params": [
141 {
142 "name": "record",
143 "description": "该行所对应的数据",
144 "type": {
145 "name": "Object"
146 }
147 },
148 {
149 "name": "index",
150 "description": "该行所对应的序列",
151 "type": {
152 "name": "Number"
153 }
154 },
155 {
156 "name": "e",
157 "description": "DOM事件对象",
158 "type": {
159 "name": "Event"
160 }
161 }
162 ],
163 "returns": null
164 },
165 "onRowMouseLeave": {
166 "type": {
167 "name": "func"
168 },
169 "required": false,
170 "description": "离开表格每一行的时候触发的事件",
171 "defaultValue": {
172 "value": "() => {}",
173 "computed": false
174 },
175 "docblock": "离开表格每一行的时候触发的事件\n@param {Object} record 该行所对应的数据\n@param {Number} index 该行所对应的序列\n@param {Event} e DOM事件对象",
176 "params": [
177 {
178 "name": "record",
179 "description": "该行所对应的数据",
180 "type": {
181 "name": "Object"
182 }
183 },
184 {
185 "name": "index",
186 "description": "该行所对应的序列",
187 "type": {
188 "name": "Number"
189 }
190 },
191 {
192 "name": "e",
193 "description": "DOM事件对象",
194 "type": {
195 "name": "Event"
196 }
197 }
198 ],
199 "returns": null
200 },
201 "onSort": {
202 "type": {
203 "name": "func"
204 },
205 "required": false,
206 "description": "点击列排序触发的事件",
207 "defaultValue": {
208 "value": "() => {}",
209 "computed": false
210 },
211 "docblock": "点击列排序触发的事件\n@param {String} dataIndex 指定的排序的字段\n@param {String} order 排序对应的顺序, 有`desc`和`asc`两种",
212 "params": [
213 {
214 "name": "dataIndex",
215 "description": "指定的排序的字段",
216 "type": {
217 "name": "String"
218 }
219 },
220 {
221 "name": "order",
222 "description": "排序对应的顺序, 有`desc`和`asc`两种",
223 "type": {
224 "name": "String"
225 }
226 }
227 ],
228 "returns": null
229 },
230 "onFilter": {
231 "type": {
232 "name": "func"
233 },
234 "required": false,
235 "description": "点击过滤确认按钮触发的事件",
236 "defaultValue": {
237 "value": "() => {}",
238 "computed": false
239 },
240 "docblock": "点击过滤确认按钮触发的事件\n@param {Object} filterParams 过滤的字段信息",
241 "params": [
242 {
243 "name": "filterParams",
244 "description": "过滤的字段信息",
245 "type": {
246 "name": "Object"
247 }
248 }
249 ],
250 "returns": null
251 },
252 "onResizeChange": {
253 "type": {
254 "name": "func"
255 },
256 "required": false,
257 "description": "重设列尺寸的时候触发的事件",
258 "defaultValue": {
259 "value": "() => {}",
260 "computed": false
261 },
262 "docblock": "重设列尺寸的时候触发的事件\n@param {String} dataIndex 指定重设的字段\n@param {Number} value 列宽变动的数值",
263 "params": [
264 {
265 "name": "dataIndex",
266 "description": "指定重设的字段",
267 "type": {
268 "name": "String"
269 }
270 },
271 {
272 "name": "value",
273 "description": "列宽变动的数值",
274 "type": {
275 "name": "Number"
276 }
277 }
278 ],
279 "returns": null
280 },
281 "rowProps": {
282 "type": {
283 "name": "func"
284 },
285 "required": false,
286 "description": "设置每一行的属性,如果返回值和其他针对行操作的属性冲突则无效。",
287 "defaultValue": {
288 "value": "() => {}",
289 "computed": false
290 },
291 "docblock": "设置每一行的属性,如果返回值和其他针对行操作的属性冲突则无效。\n@param {Object} record 该行所对应的数据\n@param {Number} index 该行所对应的序列\n@returns {Object} 需要设置的行属性",
292 "params": [
293 {
294 "name": "record",
295 "description": "该行所对应的数据",
296 "type": {
297 "name": "Object"
298 }
299 },
300 {
301 "name": "index",
302 "description": "该行所对应的序列",
303 "type": {
304 "name": "Number"
305 }
306 }
307 ],
308 "returns": {
309 "description": "需要设置的行属性",
310 "type": {
311 "name": "Object"
312 }
313 }
314 },
315 "cellProps": {
316 "type": {
317 "name": "func"
318 },
319 "required": false,
320 "description": "设置单元格的属性,通过该属性可以进行合并单元格",
321 "defaultValue": {
322 "value": "() => {}",
323 "computed": false
324 },
325 "docblock": "设置单元格的属性,通过该属性可以进行合并单元格\n@param {Number} rowIndex 该行所对应的序列\n@param {Number} colIndex 该列所对应的序列\n@param {String} dataIndex 该列所对应的字段名称\n@param {Object} record 该行对应的记录\n@returns {Object} 返回td元素的所支持的属性对象",
326 "params": [
327 {
328 "name": "rowIndex",
329 "description": "该行所对应的序列",
330 "type": {
331 "name": "Number"
332 }
333 },
334 {
335 "name": "colIndex",
336 "description": "该列所对应的序列",
337 "type": {
338 "name": "Number"
339 }
340 },
341 {
342 "name": "dataIndex",
343 "description": "该列所对应的字段名称",
344 "type": {
345 "name": "String"
346 }
347 },
348 {
349 "name": "record",
350 "description": "该行对应的记录",
351 "type": {
352 "name": "Object"
353 }
354 }
355 ],
356 "returns": {
357 "description": "返回td元素的所支持的属性对象",
358 "type": {
359 "name": "Object"
360 }
361 }
362 },
363 "hasBorder": {
364 "type": {
365 "name": "bool"
366 },
367 "required": false,
368 "description": "表格是否具有边框",
369 "defaultValue": {
370 "value": "true",
371 "computed": false
372 },
373 "docblock": "表格是否具有边框"
374 },
375 "hasHeader": {
376 "type": {
377 "name": "bool"
378 },
379 "required": false,
380 "description": "表格是否具有头部",
381 "defaultValue": {
382 "value": "true",
383 "computed": false
384 },
385 "docblock": "表格是否具有头部"
386 },
387 "isZebra": {
388 "type": {
389 "name": "bool"
390 },
391 "required": false,
392 "description": "表格是否是斑马线",
393 "defaultValue": {
394 "value": "false",
395 "computed": false
396 },
397 "docblock": "表格是否是斑马线"
398 },
399 "loading": {
400 "type": {
401 "name": "bool"
402 },
403 "required": false,
404 "description": "表格是否在加载中",
405 "defaultValue": {
406 "value": "false",
407 "computed": false
408 },
409 "docblock": "表格是否在加载中"
410 },
411 "loadingComponent": {
412 "type": {
413 "name": "func"
414 },
415 "required": false,
416 "description": "自定义 Loading 组件\n请务必传递 props, 使用方式: loadingComponent={props => <Loading {...props}/>}",
417 "docblock": "自定义 Loading 组件\n请务必传递 props, 使用方式: loadingComponent={props => <Loading {...props}/>}\n@param {LoadingProps} props 需要透传给组件的参数\n@return {React.ReactNode} 展示的组件",
418 "params": [
419 {
420 "name": "props",
421 "description": "需要透传给组件的参数",
422 "type": {
423 "name": "LoadingProps"
424 }
425 }
426 ],
427 "returns": {
428 "description": "展示的组件",
429 "type": {
430 "name": "React.ReactNode"
431 }
432 }
433 },
434 "filterParams": {
435 "type": {
436 "name": "object"
437 },
438 "required": false,
439 "description": "当前过滤的的keys,使用此属性可以控制表格的头部的过滤选项中哪个菜单被选中,格式为 {dataIndex: {selectedKeys:[]}}\n示例:\n假设要控制dataIndex为id的列的过滤菜单中key为one的菜单项选中\n`<Table filterParams={{id: {selectedKeys: ['one']}}}/>`",
440 "docblock": "当前过滤的的keys,使用此属性可以控制表格的头部的过滤选项中哪个菜单被选中,格式为 {dataIndex: {selectedKeys:[]}}\n示例:\n假设要控制dataIndex为id的列的过滤菜单中key为one的菜单项选中\n`<Table filterParams={{id: {selectedKeys: ['one']}}}/>`",
441 "properties": []
442 },
443 "sort": {
444 "type": {
445 "name": "object"
446 },
447 "required": false,
448 "description": "当前排序的字段,使用此属性可以控制表格的字段的排序,格式为{[dataIndex]: 'asc' | 'desc' } , 例如 {id: 'desc'}",
449 "docblock": "当前排序的字段,使用此属性可以控制表格的字段的排序,格式为{[dataIndex]: 'asc' | 'desc' } , 例如 {id: 'desc'}",
450 "properties": []
451 },
452 "sortIcons": {
453 "type": {
454 "name": "object"
455 },
456 "required": false,
457 "description": "自定义排序按钮,例如上下排布的: `{desc: <Icon style={{top: '6px', left: '4px'}} type={'arrow-down'} size=\"small\" />, asc: <Icon style={{top: '-6px', left: '4px'}} type={'arrow-up'} size=\"small\" />}`",
458 "docblock": "自定义排序按钮,例如上下排布的: `{desc: <Icon style={{top: '6px', left: '4px'}} type={'arrow-down'} size=\"small\" />, asc: <Icon style={{top: '-6px', left: '4px'}} type={'arrow-up'} size=\"small\" />}`",
459 "properties": []
460 },
461 "locale": {
462 "type": {
463 "name": "object"
464 },
465 "required": false,
466 "description": "自定义国际化文案对象",
467 "defaultValue": {
468 "value": "zhCN.Table",
469 "computed": true
470 },
471 "docblock": "自定义国际化文案对象\n@property {String} ok 过滤器中确认按钮文案\n@property {String} reset 过滤器中重置按钮文案\n@property {String} empty 没有数据情况下 table内的文案\n@property {String} asc 排序升序状态下的文案\n@property {String} desc 排序将序状态下的文案\n@property {String} expanded 可折叠行,展开状态下的文案\n@property {String} folded 可折叠行,折叠状态下的文案\n@property {String} filter 过滤器文案\n@property {String} selectAll header里全选的按钮文案",
472 "properties": [
473 {
474 "name": "ok",
475 "description": "过滤器中确认按钮文案",
476 "type": {
477 "name": "String"
478 }
479 },
480 {
481 "name": "reset",
482 "description": "过滤器中重置按钮文案",
483 "type": {
484 "name": "String"
485 }
486 },
487 {
488 "name": "empty",
489 "description": "没有数据情况下 table内的文案",
490 "type": {
491 "name": "String"
492 }
493 },
494 {
495 "name": "asc",
496 "description": "排序升序状态下的文案",
497 "type": {
498 "name": "String"
499 }
500 },
501 {
502 "name": "desc",
503 "description": "排序将序状态下的文案",
504 "type": {
505 "name": "String"
506 }
507 },
508 {
509 "name": "expanded",
510 "description": "可折叠行,展开状态下的文案",
511 "type": {
512 "name": "String"
513 }
514 },
515 {
516 "name": "folded",
517 "description": "可折叠行,折叠状态下的文案",
518 "type": {
519 "name": "String"
520 }
521 },
522 {
523 "name": "filter",
524 "description": "过滤器文案",
525 "type": {
526 "name": "String"
527 }
528 },
529 {
530 "name": "selectAll",
531 "description": "header里全选的按钮文案",
532 "type": {
533 "name": "String"
534 }
535 }
536 ]
537 },
538 "columns": {
539 "type": {
540 "name": "array"
541 },
542 "required": false,
543 "description": "等同于写子组件 Table.Column ,子组件优先级更高",
544 "docblock": "等同于写子组件 Table.Column ,子组件优先级更高"
545 },
546 "emptyContent": {
547 "type": {
548 "name": "node"
549 },
550 "required": false,
551 "description": "设置数据为空的时候的表格内容展现",
552 "docblock": "设置数据为空的时候的表格内容展现"
553 },
554 "primaryKey": {
555 "type": {
556 "name": "union",
557 "value": [
558 {
559 "name": "symbol"
560 },
561 {
562 "name": "string"
563 }
564 ]
565 },
566 "required": false,
567 "description": "dataSource当中数据的主键,如果给定的数据源中的属性不包含该主键,会造成选择状态全部选中",
568 "defaultValue": {
569 "value": "'id'",
570 "computed": false
571 },
572 "docblock": "dataSource当中数据的主键,如果给定的数据源中的属性不包含该主键,会造成选择状态全部选中"
573 },
574 "expandedRowRender": {
575 "type": {
576 "name": "func"
577 },
578 "required": false,
579 "description": "额外渲染行的渲染函数",
580 "docblock": "额外渲染行的渲染函数\n@param {Object} record 该行所对应的数据\n@param {Number} index 该行所对应的序列\n@returns {Element} 渲染内容",
581 "params": [
582 {
583 "name": "record",
584 "description": "该行所对应的数据",
585 "type": {
586 "name": "Object"
587 }
588 },
589 {
590 "name": "index",
591 "description": "该行所对应的序列",
592 "type": {
593 "name": "Number"
594 }
595 }
596 ],
597 "returns": {
598 "description": "渲染内容",
599 "type": {
600 "name": "Element"
601 }
602 }
603 },
604 "rowExpandable": {
605 "type": {
606 "name": "func"
607 },
608 "required": false,
609 "description": "设置行是否可展开,设置 false 为不可展开",
610 "docblock": "设置行是否可展开,设置 false 为不可展开\n@param {Object} record 该行所对应的数据\n@param {Number} index 该行所对应的序列\n@returns {Boolean} 是否可展开",
611 "params": [
612 {
613 "name": "record",
614 "description": "该行所对应的数据",
615 "type": {
616 "name": "Object"
617 }
618 },
619 {
620 "name": "index",
621 "description": "该行所对应的序列",
622 "type": {
623 "name": "Number"
624 }
625 }
626 ],
627 "returns": {
628 "description": "是否可展开",
629 "type": {
630 "name": "Boolean"
631 }
632 }
633 },
634 "expandedRowIndent": {
635 "type": {
636 "name": "array"
637 },
638 "required": false,
639 "description": "额外渲染行的缩进",
640 "docblock": "额外渲染行的缩进"
641 },
642 "hasExpandedRowCtrl": {
643 "type": {
644 "name": "bool"
645 },
646 "required": false,
647 "description": "是否显示点击展开额外渲染行的+号按钮",
648 "docblock": "是否显示点击展开额外渲染行的+号按钮"
649 },
650 "getExpandedColProps": {
651 "type": {
652 "name": "func"
653 },
654 "required": false,
655 "description": "设置额外渲染行的属性",
656 "docblock": "设置额外渲染行的属性\n@param {Object} record 该行所对应的数据\n@param {Number} index 该行所对应的序列\n@returns {Object} 额外渲染行的属性",
657 "params": [
658 {
659 "name": "record",
660 "description": "该行所对应的数据",
661 "type": {
662 "name": "Object"
663 }
664 },
665 {
666 "name": "index",
667 "description": "该行所对应的序列",
668 "type": {
669 "name": "Number"
670 }
671 }
672 ],
673 "returns": {
674 "description": "额外渲染行的属性",
675 "type": {
676 "name": "Object"
677 }
678 }
679 },
680 "openRowKeys": {
681 "type": {
682 "name": "array"
683 },
684 "required": false,
685 "description": "当前展开的 Expand行 或者 Tree行 , 传入此属性为受控状态,一般配合 onRowOpen 使用",
686 "docblock": "当前展开的 Expand行 或者 Tree行 , 传入此属性为受控状态,一般配合 onRowOpen 使用"
687 },
688 "defaultOpenRowKeys": {
689 "type": {
690 "name": "array"
691 },
692 "required": false,
693 "description": "默认情况下展开的 Expand行 或者 Tree行,非受控模式",
694 "docblock": "默认情况下展开的 Expand行 或者 Tree行,非受控模式\n@version 1.23.22",
695 "version": {
696 "value": "1.23.22",
697 "computed": false
698 }
699 },
700 "onRowOpen": {
701 "type": {
702 "name": "func"
703 },
704 "required": false,
705 "description": "在 Expand行 或者 Tree行 展开或者收起的时候触发的事件",
706 "docblock": "在 Expand行 或者 Tree行 展开或者收起的时候触发的事件\n@param {Array} openRowKeys 展开的渲染行的key\n@param {String} currentRowKey 当前点击的渲染行的key\n@param {Boolean} expanded 当前点击是展开还是收起\n@param {Object} currentRecord 当前点击额外渲染行的记录",
707 "params": [
708 {
709 "name": "openRowKeys",
710 "description": "展开的渲染行的key",
711 "type": {
712 "name": "Array"
713 }
714 },
715 {
716 "name": "currentRowKey",
717 "description": "当前点击的渲染行的key",
718 "type": {
719 "name": "String"
720 }
721 },
722 {
723 "name": "expanded",
724 "description": "当前点击是展开还是收起",
725 "type": {
726 "name": "Boolean"
727 }
728 },
729 {
730 "name": "currentRecord",
731 "description": "当前点击额外渲染行的记录",
732 "type": {
733 "name": "Object"
734 }
735 }
736 ],
737 "returns": null
738 },
739 "fixedHeader": {
740 "type": {
741 "name": "bool"
742 },
743 "required": false,
744 "description": "表头是否固定,该属性配合maxBodyHeight使用,当内容区域的高度超过maxBodyHeight的时候,在内容区域会出现滚动条",
745 "docblock": "表头是否固定,该属性配合maxBodyHeight使用,当内容区域的高度超过maxBodyHeight的时候,在内容区域会出现滚动条"
746 },
747 "maxBodyHeight": {
748 "type": {
749 "name": "union",
750 "value": [
751 {
752 "name": "number"
753 },
754 {
755 "name": "string"
756 }
757 ]
758 },
759 "required": false,
760 "description": "最大内容区域的高度,在`fixedHeader`为`true`的时候,超过这个高度会出现滚动条",
761 "docblock": "最大内容区域的高度,在`fixedHeader`为`true`的时候,超过这个高度会出现滚动条"
762 },
763 "rowSelection": {
764 "type": {
765 "name": "object"
766 },
767 "required": false,
768 "description": "是否启用选择模式",
769 "docblock": "是否启用选择模式\n@property {Function} getProps `Function(record, index)=>Object` 获取selection的默认属性\n@property {Function} onChange `Function(selectedRowKeys:Array, records:Array)` 选择改变的时候触发的事件,**注意:** 其中records只会包含当前dataSource的数据,很可能会小于selectedRowKeys的长度。\n@property {Function} onSelect `Function(selected:Boolean, record:Object, records:Array)` 用户手动选择/取消选择某行的回调\n@property {Function} onSelectAll `Function(selected:Boolean, records:Array)` 用户手动选择/取消选择所有行的回调\n@property {Array} selectedRowKeys 设置了此属性,将rowSelection变为受控状态,接收值为该行数据的primaryKey的值\n@property {String} mode 选择selection的模式, 可选值为`single`, `multiple`,默认为`multiple`\n@property {Function} columnProps `Function()=>Object` 选择列 的props,例如锁列、对齐等,可使用`Table.Column` 的所有参数\n@property {Function} titleProps `Function()=>Object` 选择列 表头的props,仅在 `multiple` 模式下生效\n@property {Function} titleAddons `Function()=>Node` 选择列 表头添加的元素,在`single` `multiple` 下都生效",
770 "properties": [
771 {
772 "name": "getProps",
773 "description": "`Function(record, index)=>Object` 获取selection的默认属性",
774 "type": {
775 "name": "Function"
776 }
777 },
778 {
779 "name": "onChange",
780 "description": "`Function(selectedRowKeys:Array, records:Array)` 选择改变的时候触发的事件,**注意:** 其中records只会包含当前dataSource的数据,很可能会小于selectedRowKeys的长度。",
781 "type": {
782 "name": "Function"
783 }
784 },
785 {
786 "name": "onSelect",
787 "description": "`Function(selected:Boolean, record:Object, records:Array)` 用户手动选择/取消选择某行的回调",
788 "type": {
789 "name": "Function"
790 }
791 },
792 {
793 "name": "onSelectAll",
794 "description": "`Function(selected:Boolean, records:Array)` 用户手动选择/取消选择所有行的回调",
795 "type": {
796 "name": "Function"
797 }
798 },
799 {
800 "name": "selectedRowKeys",
801 "description": "设置了此属性,将rowSelection变为受控状态,接收值为该行数据的primaryKey的值",
802 "type": {
803 "name": "Array"
804 }
805 },
806 {
807 "name": "mode",
808 "description": "选择selection的模式, 可选值为`single`, `multiple`,默认为`multiple`",
809 "type": {
810 "name": "String"
811 }
812 },
813 {
814 "name": "columnProps",
815 "description": "`Function()=>Object` 选择列 的props,例如锁列、对齐等,可使用`Table.Column` 的所有参数",
816 "type": {
817 "name": "Function"
818 }
819 },
820 {
821 "name": "titleProps",
822 "description": "`Function()=>Object` 选择列 表头的props,仅在 `multiple` 模式下生效",
823 "type": {
824 "name": "Function"
825 }
826 },
827 {
828 "name": "titleAddons",
829 "description": "`Function()=>Node` 选择列 表头添加的元素,在`single` `multiple` 下都生效",
830 "type": {
831 "name": "Function"
832 }
833 }
834 ]
835 },
836 "stickyHeader": {
837 "type": {
838 "name": "bool"
839 },
840 "required": false,
841 "description": "表头是否是sticky",
842 "docblock": "表头是否是sticky"
843 },
844 "offsetTop": {
845 "type": {
846 "name": "number"
847 },
848 "required": false,
849 "description": "距离窗口顶部达到指定偏移量后触发",
850 "docblock": "距离窗口顶部达到指定偏移量后触发"
851 },
852 "affixProps": {
853 "type": {
854 "name": "object"
855 },
856 "required": false,
857 "description": "affix组件的的属性",
858 "docblock": "affix组件的的属性",
859 "properties": []
860 },
861 "indent": {
862 "type": {
863 "name": "number"
864 },
865 "required": false,
866 "description": "在tree模式下的缩进尺寸, 仅在isTree为true时候有效",
867 "docblock": "在tree模式下的缩进尺寸, 仅在isTree为true时候有效"
868 },
869 "isTree": {
870 "type": {
871 "name": "bool"
872 },
873 "required": false,
874 "description": "开启Table的tree模式, 接收的数据格式中包含children则渲染成tree table",
875 "docblock": "开启Table的tree模式, 接收的数据格式中包含children则渲染成tree table"
876 },
877 "useVirtual": {
878 "type": {
879 "name": "bool"
880 },
881 "required": false,
882 "description": "是否开启虚拟滚动",
883 "docblock": "是否开启虚拟滚动"
884 },
885 "scrollToRow": {
886 "type": {
887 "name": "number"
888 },
889 "required": false,
890 "description": "滚动到第几行,需要保证行高相同。1.22.15 版本之前仅在虚拟滚动场景下生效,之后在所有情况下生效",
891 "docblock": "滚动到第几行,需要保证行高相同。1.22.15 版本之前仅在虚拟滚动场景下生效,之后在所有情况下生效\n@version 1.22.15",
892 "version": {
893 "value": "1.22.15",
894 "computed": false
895 }
896 },
897 "onBodyScroll": {
898 "type": {
899 "name": "func"
900 },
901 "required": false,
902 "description": "在内容区域滚动的时候触发的函数",
903 "docblock": "在内容区域滚动的时候触发的函数",
904 "params": [],
905 "returns": null
906 },
907 "expandedIndexSimulate": {
908 "type": {
909 "name": "bool"
910 },
911 "required": false,
912 "description": "开启时,getExpandedColProps() / rowProps() / expandedRowRender() 的第二个参数 index (该行所对应的序列) 将按照01,2,3,4...的顺序返回,否则返回真实index(0,2,4,6... / 1,3,5,7...)",
913 "defaultValue": {
914 "value": "false",
915 "computed": false
916 },
917 "docblock": "开启时,getExpandedColProps() / rowProps() / expandedRowRender() 的第二个参数 index (该行所对应的序列) 将按照01,2,3,4...的顺序返回,否则返回真实index(0,2,4,6... / 1,3,5,7...)"
918 },
919 "crossline": {
920 "type": {
921 "name": "bool"
922 },
923 "required": false,
924 "description": "在 hover 时出现十字参考轴,适用于表头比较复杂,需要做表头分类的场景。",
925 "defaultValue": {
926 "value": "false",
927 "computed": false
928 },
929 "docblock": "在 hover 时出现十字参考轴,适用于表头比较复杂,需要做表头分类的场景。"
930 }
931 },
932 "methods": [],
933 "subComponents": [
934 {
935 "name": "Column",
936 "props": {
937 "dataIndex": {
938 "type": {
939 "name": "string"
940 },
941 "required": false,
942 "description": "指定列对应的字段,支持`a.b`形式的快速取值",
943 "docblock": "指定列对应的字段,支持`a.b`形式的快速取值"
944 },
945 "cell": {
946 "type": {
947 "name": "union",
948 "value": [
949 {
950 "name": "element"
951 },
952 {
953 "name": "node"
954 },
955 {
956 "name": "func"
957 }
958 ]
959 },
960 "required": false,
961 "description": "行渲染的逻辑\nvalue, rowIndex, record, context四个属性只可读不可被更改\nFunction(value, index, record) => Element",
962 "defaultValue": {
963 "value": "value => value",
964 "computed": false
965 },
966 "docblock": "行渲染的逻辑\nvalue, rowIndex, record, context四个属性只可读不可被更改\nFunction(value, index, record) => Element"
967 },
968 "title": {
969 "type": {
970 "name": "union",
971 "value": [
972 {
973 "name": "element"
974 },
975 {
976 "name": "node"
977 },
978 {
979 "name": "func"
980 }
981 ]
982 },
983 "required": false,
984 "description": "表头显示的内容",
985 "docblock": "表头显示的内容"
986 },
987 "htmlTitle": {
988 "type": {
989 "name": "string"
990 },
991 "required": false,
992 "description": "写到 header 单元格上的title属性",
993 "docblock": "写到 header 单元格上的title属性"
994 },
995 "sortable": {
996 "type": {
997 "name": "bool"
998 },
999 "required": false,
1000 "description": "是否支持排序",
1001 "docblock": "是否支持排序"
1002 },
1003 "sortDirections": {
1004 "type": {
1005 "name": "arrayOf",
1006 "value": {
1007 "name": "enum",
1008 "value": [
1009 {
1010 "value": "'desc'",
1011 "computed": false
1012 },
1013 {
1014 "value": "'asc'",
1015 "computed": false
1016 },
1017 {
1018 "value": "'default'",
1019 "computed": false
1020 }
1021 ]
1022 }
1023 },
1024 "required": false,
1025 "description": "排序的方向。\n设置 ['desc', 'asc'],表示降序、升序\n设置 ['desc', 'asc', 'default'],表示表示降序、升序、不排序",
1026 "docblock": "排序的方向。\n设置 ['desc', 'asc'],表示降序、升序\n设置 ['desc', 'asc', 'default'],表示表示降序、升序、不排序\n@version 1.23",
1027 "version": {
1028 "value": "1.23",
1029 "computed": false
1030 }
1031 },
1032 "width": {
1033 "type": {
1034 "name": "union",
1035 "value": [
1036 {
1037 "name": "number"
1038 },
1039 {
1040 "name": "string"
1041 }
1042 ]
1043 },
1044 "required": false,
1045 "description": "列宽,注意在锁列的情况下一定需要配置宽度",
1046 "docblock": "列宽,注意在锁列的情况下一定需要配置宽度"
1047 },
1048 "align": {
1049 "type": {
1050 "name": "enum",
1051 "value": [
1052 {
1053 "value": "'left'",
1054 "computed": false
1055 },
1056 {
1057 "value": "'center'",
1058 "computed": false
1059 },
1060 {
1061 "value": "'right'",
1062 "computed": false
1063 }
1064 ]
1065 },
1066 "required": false,
1067 "description": "单元格的对齐方式",
1068 "docblock": "单元格的对齐方式"
1069 },
1070 "alignHeader": {
1071 "type": {
1072 "name": "enum",
1073 "value": [
1074 {
1075 "value": "'left'",
1076 "computed": false
1077 },
1078 {
1079 "value": "'center'",
1080 "computed": false
1081 },
1082 {
1083 "value": "'right'",
1084 "computed": false
1085 }
1086 ]
1087 },
1088 "required": false,
1089 "description": "单元格标题的对齐方式, 不配置默认读取align值",
1090 "docblock": "单元格标题的对齐方式, 不配置默认读取align值"
1091 },
1092 "filters": {
1093 "type": {
1094 "name": "arrayOf",
1095 "value": {
1096 "name": "shape",
1097 "value": {
1098 "label": {
1099 "name": "string",
1100 "required": false
1101 },
1102 "value": {
1103 "name": "union",
1104 "value": [
1105 {
1106 "name": "node"
1107 },
1108 {
1109 "name": "string"
1110 }
1111 ],
1112 "required": false
1113 }
1114 }
1115 }
1116 },
1117 "required": false,
1118 "description": "生成标题过滤的菜单, 格式为`[{label:'xxx', value:'xxx'}]`",
1119 "docblock": "生成标题过滤的菜单, 格式为`[{label:'xxx', value:'xxx'}]`"
1120 },
1121 "filterMode": {
1122 "type": {
1123 "name": "enum",
1124 "value": [
1125 {
1126 "value": "'single'",
1127 "computed": false
1128 },
1129 {
1130 "value": "'multiple'",
1131 "computed": false
1132 }
1133 ]
1134 },
1135 "required": false,
1136 "description": "过滤的模式是单选还是多选",
1137 "defaultValue": {
1138 "value": "'multiple'",
1139 "computed": false
1140 },
1141 "docblock": "过滤的模式是单选还是多选"
1142 },
1143 "filterMenuProps": {
1144 "type": {
1145 "name": "object"
1146 },
1147 "required": false,
1148 "description": "filter 模式下传递给 Menu 菜单的属性, 默认继承 `Menu` 组件的API",
1149 "defaultValue": {
1150 "value": "{\n subMenuSelectable: false,\n}",
1151 "computed": false
1152 },
1153 "docblock": "filter 模式下传递给 Menu 菜单的属性, 默认继承 `Menu` 组件的API\n@property {Boolean} subMenuSelectable 默认为`false` subMenu是否可选择\n@property {Boolean} isSelectIconRight 默认为`false` 是否将选中图标居右。注意:SubMenu 上的选中图标一直居左,不受此API控制",
1154 "properties": [
1155 {
1156 "name": "subMenuSelectable",
1157 "description": "默认为`false` subMenu是否可选择",
1158 "type": {
1159 "name": "Boolean"
1160 }
1161 },
1162 {
1163 "name": "isSelectIconRight",
1164 "description": "默认为`false` 是否将选中图标居右。注意:SubMenu 上的选中图标一直居左,不受此API控制",
1165 "type": {
1166 "name": "Boolean"
1167 }
1168 }
1169 ]
1170 },
1171 "lock": {
1172 "type": {
1173 "name": "union",
1174 "value": [
1175 {
1176 "name": "bool"
1177 },
1178 {
1179 "name": "string"
1180 }
1181 ]
1182 },
1183 "required": false,
1184 "description": "是否支持锁列,可选值为`left`,`right`, `true`",
1185 "docblock": "是否支持锁列,可选值为`left`,`right`, `true`"
1186 },
1187 "resizable": {
1188 "type": {
1189 "name": "bool"
1190 },
1191 "required": false,
1192 "description": "是否支持列宽调整, 当该值设为true,table的布局方式会修改为fixed.",
1193 "defaultValue": {
1194 "value": "false",
1195 "computed": false
1196 },
1197 "docblock": "是否支持列宽调整, 当该值设为true,table的布局方式会修改为fixed."
1198 },
1199 "asyncResizable": {
1200 "type": {
1201 "name": "bool"
1202 },
1203 "required": false,
1204 "description": "(推荐使用)是否支持异步列宽调整, 当该值设为true,table的布局方式会修改为fixed.",
1205 "defaultValue": {
1206 "value": "false",
1207 "computed": false
1208 },
1209 "docblock": "(推荐使用)是否支持异步列宽调整, 当该值设为true,table的布局方式会修改为fixed.\n@version 1.24",
1210 "version": {
1211 "value": "1.24",
1212 "computed": false
1213 }
1214 },
1215 "colSpan": {
1216 "type": {
1217 "name": "number"
1218 },
1219 "required": false,
1220 "description": "header cell 横跨的格数,设置为0表示不出现此 th",
1221 "docblock": "header cell 横跨的格数,设置为0表示不出现此 th"
1222 },
1223 "wordBreak": {
1224 "type": {
1225 "name": "enum",
1226 "value": [
1227 {
1228 "value": "'all'",
1229 "computed": false,
1230 "description": "all"
1231 },
1232 {
1233 "value": "'word'",
1234 "computed": false,
1235 "description": "word"
1236 }
1237 ]
1238 },
1239 "required": false,
1240 "description": "设置该列单元格的word-break样式,对于id类、中文类适合用all,对于英文句子适合用word",
1241 "docblock": "设置该列单元格的word-break样式,对于id类、中文类适合用all,对于英文句子适合用word\n@enumdesc all, word\n@default all\n@version 1.23",
1242 "value": [
1243 {
1244 "value": "'all'",
1245 "computed": false,
1246 "description": "all"
1247 },
1248 {
1249 "value": "'word'",
1250 "computed": false,
1251 "description": "word"
1252 }
1253 ],
1254 "defaultValue": {
1255 "value": "all",
1256 "computed": false
1257 },
1258 "version": {
1259 "value": "1.23",
1260 "computed": false
1261 }
1262 }
1263 },
1264 "methods": [],
1265 "order": 0
1266 },
1267 {
1268 "name": "ColumnGroup",
1269 "props": {
1270 "title": {
1271 "type": {
1272 "name": "union",
1273 "value": [
1274 {
1275 "name": "element"
1276 },
1277 {
1278 "name": "node"
1279 },
1280 {
1281 "name": "func"
1282 }
1283 ]
1284 },
1285 "required": false,
1286 "description": "表头显示的内容",
1287 "defaultValue": {
1288 "value": "'column-group'",
1289 "computed": false
1290 },
1291 "docblock": "表头显示的内容"
1292 }
1293 },
1294 "methods": [],
1295 "order": 1
1296 },
1297 {
1298 "name": "GroupHeader",
1299 "props": {
1300 "cell": {
1301 "type": {
1302 "name": "union",
1303 "value": [
1304 {
1305 "name": "element"
1306 },
1307 {
1308 "name": "node"
1309 },
1310 {
1311 "name": "func"
1312 }
1313 ]
1314 },
1315 "required": false,
1316 "description": "行渲染的逻辑",
1317 "defaultValue": {
1318 "value": "() => ''",
1319 "computed": false
1320 },
1321 "docblock": "行渲染的逻辑"
1322 },
1323 "hasChildrenSelection": {
1324 "type": {
1325 "name": "bool"
1326 },
1327 "required": false,
1328 "description": "是否在Children上面渲染selection",
1329 "defaultValue": {
1330 "value": "false",
1331 "computed": false
1332 },
1333 "docblock": "是否在Children上面渲染selection"
1334 },
1335 "hasSelection": {
1336 "type": {
1337 "name": "bool"
1338 },
1339 "required": false,
1340 "description": "是否在GroupHeader上面渲染selection",
1341 "defaultValue": {
1342 "value": "true",
1343 "computed": false
1344 },
1345 "docblock": "是否在GroupHeader上面渲染selection"
1346 },
1347 "useFirstLevelDataWhenNoChildren": {
1348 "type": {
1349 "name": "bool"
1350 },
1351 "required": false,
1352 "description": "当 dataSouce 里没有 children 时,是否使用内容作为数据",
1353 "defaultValue": {
1354 "value": "false",
1355 "computed": false
1356 },
1357 "docblock": "当 dataSouce 里没有 children 时,是否使用内容作为数据"
1358 }
1359 },
1360 "methods": [],
1361 "order": 2
1362 },
1363 {
1364 "name": "GroupFooter",
1365 "props": {
1366 "cell": {
1367 "type": {
1368 "name": "union",
1369 "value": [
1370 {
1371 "name": "element"
1372 },
1373 {
1374 "name": "node"
1375 },
1376 {
1377 "name": "func"
1378 }
1379 ]
1380 },
1381 "required": false,
1382 "description": "行渲染的逻辑",
1383 "defaultValue": {
1384 "value": "() => ''",
1385 "computed": false
1386 },
1387 "docblock": "行渲染的逻辑"
1388 }
1389 },
1390 "methods": [],
1391 "order": 3
1392 }
1393 ]
1394}
\No newline at end of file