@ant-design/pro-components 2.6.48 → 2.6.49

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.
package/dist/api.json ADDED
@@ -0,0 +1,4340 @@
1
+ [
2
+ {
3
+ "packageName": "ProCard",
4
+ "tableData": [
5
+ {
6
+ "title": "ProCard - API",
7
+ "table": [
8
+ {
9
+ "参数": "title",
10
+ "说明": "标题",
11
+ "类型": "`React.ReactNode`",
12
+ "默认值": "-"
13
+ },
14
+ {
15
+ "参数": "subTitle",
16
+ "说明": "副标题",
17
+ "类型": "`React.ReactNode`",
18
+ "默认值": "-"
19
+ },
20
+ {
21
+ "参数": "tooltip",
22
+ "说明": "标题右侧图标 hover 提示信息",
23
+ "类型": "`string`",
24
+ "默认值": "-"
25
+ },
26
+ {
27
+ "参数": "headStyle",
28
+ "说明": "标题的 style 样式",
29
+ "类型": "`CSSProperties`",
30
+ "默认值": "-"
31
+ },
32
+ {
33
+ "参数": "bodyStyle",
34
+ "说明": "内容区的 style 样式",
35
+ "类型": "`CSSProperties`",
36
+ "默认值": "-"
37
+ },
38
+ {
39
+ "参数": "extra",
40
+ "说明": "右上角自定义区域",
41
+ "类型": "`React.ReactNode`",
42
+ "默认值": "-"
43
+ },
44
+ {
45
+ "参数": "layout",
46
+ "说明": "内容布局,支持垂直居中",
47
+ "类型": "`default` | `center`",
48
+ "默认值": "default"
49
+ },
50
+ {
51
+ "参数": "loading",
52
+ "说明": "加载中,支持自定义 loading 样式",
53
+ "类型": "`boolean` | `ReactNode`",
54
+ "默认值": "false"
55
+ },
56
+ {
57
+ "参数": "colSpan",
58
+ "说明": "栅格布局宽度,24 栅格,支持指定宽度 px 或百分比,支持响应式的对象写法 `{ xs: 8, sm: 16, md: 24}`, 仅在嵌套的子卡片上设置有效。",
59
+ "类型": "`number` | `string`",
60
+ "默认值": "24"
61
+ },
62
+ {
63
+ "参数": "gutter",
64
+ "说明": "数字或使用数组形式同时设置 [水平间距,垂直间距], 支持响应式的对象写法 `{ xs: 8, sm: 16, md: 24}`",
65
+ "类型": "`number` | `array`",
66
+ "默认值": "0"
67
+ },
68
+ {
69
+ "参数": "split",
70
+ "说明": "拆分卡片的方向",
71
+ "类型": "`vertical` | `horizontal`",
72
+ "默认值": "-"
73
+ },
74
+ {
75
+ "参数": "type",
76
+ "说明": "卡片类型",
77
+ "类型": "`inner` | `default`",
78
+ "默认值": "-"
79
+ },
80
+ {
81
+ "参数": "size",
82
+ "说明": "卡片尺寸",
83
+ "类型": "`default` | `small`",
84
+ "默认值": "-"
85
+ },
86
+ {
87
+ "参数": "actions",
88
+ "说明": "卡片操作组,位置在卡片底部",
89
+ "类型": "`Array<ReactNode>`",
90
+ "默认值": "-"
91
+ },
92
+ {
93
+ "参数": "direction",
94
+ "说明": "指定 Flex 方向,仅在嵌套子卡片时有效,默认方向为 row 横向",
95
+ "类型": "`column`",
96
+ "默认值": "-"
97
+ },
98
+ {
99
+ "参数": "wrap",
100
+ "说明": "是否支持换行,仅在嵌套子卡片时有效",
101
+ "类型": "false",
102
+ "默认值": "-",
103
+ "版本": "1.12.0"
104
+ },
105
+ {
106
+ "参数": "bordered",
107
+ "说明": "是否有边框",
108
+ "类型": "`boolean`",
109
+ "默认值": "false"
110
+ },
111
+ {
112
+ "参数": "ghost",
113
+ "说明": "幽灵模式,即是否取消卡片内容区域的 padding 和 卡片的背景颜色。",
114
+ "类型": "`boolean`",
115
+ "默认值": "false"
116
+ },
117
+ {
118
+ "参数": "headerBordered",
119
+ "说明": "页头是否有分割线",
120
+ "类型": "`boolean`",
121
+ "默认值": "false"
122
+ },
123
+ {
124
+ "参数": "collapsed",
125
+ "说明": "受控属性,是否折叠",
126
+ "类型": "`boolean`",
127
+ "默认值": "false"
128
+ },
129
+ {
130
+ "参数": "collapsible",
131
+ "说明": "配置是否可折叠,受控时无效",
132
+ "类型": "`boolean`",
133
+ "默认值": "false"
134
+ },
135
+ {
136
+ "参数": "collapsibleIconRender",
137
+ "说明": "替换默认折叠图标",
138
+ "类型": "`({ collapsed }: { collapsed: boolean }) => React.ReactNode`",
139
+ "默认值": "-"
140
+ },
141
+ {
142
+ "参数": "defaultCollapsed",
143
+ "说明": "默认折叠,受控时无效",
144
+ "类型": "`boolean`",
145
+ "默认值": "false"
146
+ },
147
+ {
148
+ "参数": "onCollapse",
149
+ "说明": "收起卡片的事件,受控时无效",
150
+ "类型": "`(collapsed: boolean) => void`",
151
+ "默认值": "-"
152
+ },
153
+ {
154
+ "参数": "tabs",
155
+ "说明": "标签页配置",
156
+ "类型": "见下面 ProCardTabs",
157
+ "默认值": "-"
158
+ }
159
+ ]
160
+ },
161
+ {
162
+ "title": "ProCard - ProCardTabs",
163
+ "table": [
164
+ {
165
+ "参数": "activeKey",
166
+ "说明": "当前选中项",
167
+ "类型": "string",
168
+ "默认值": "-"
169
+ },
170
+ {
171
+ "参数": "type",
172
+ "说明": "页签的基本样式,可选 `line`、`card`、`editable-card` 类型",
173
+ "类型": "string",
174
+ "默认值": "inline"
175
+ },
176
+ {
177
+ "参数": "onChange",
178
+ "说明": "回调",
179
+ "类型": "`(activeKey: string) => void;`",
180
+ "默认值": "-"
181
+ },
182
+ {
183
+ "参数": "items",
184
+ "说明": "基于 antd 拓展的页签的基本配置,必填",
185
+ "类型": "`ItemsProps`",
186
+ "默认值": "-"
187
+ }
188
+ ]
189
+ },
190
+ {
191
+ "title": "ProCard - ItemsProps",
192
+ "table": [
193
+ {
194
+ "参数": "cardProps",
195
+ "说明": "ProCard 卡片属性透传",
196
+ "类型": "`ProCard`",
197
+ "默认值": "-"
198
+ }
199
+ ]
200
+ },
201
+ {
202
+ "title": "ProCard - ProCard.TabPane",
203
+ "table": [
204
+ {
205
+ "参数": "key",
206
+ "说明": "对应 activeKey,用于标定是否选中和 dom 更新,一定不要重复,不然会造成表现异常",
207
+ "类型": "`string`",
208
+ "默认值": "-"
209
+ },
210
+ {
211
+ "参数": "tab",
212
+ "说明": "选项卡头显示文字",
213
+ "类型": "`ReactNode`",
214
+ "默认值": "-"
215
+ },
216
+ {
217
+ "参数": "disabled",
218
+ "说明": "不可用",
219
+ "类型": "`boolean`",
220
+ "默认值": "false"
221
+ },
222
+ {
223
+ "参数": "cardProps",
224
+ "说明": "ProCard 卡片属性透传",
225
+ "类型": "`ProCard`",
226
+ "默认值": "-"
227
+ }
228
+ ]
229
+ },
230
+ {
231
+ "title": "ProCard - ProCard.Divider",
232
+ "table": [
233
+ {
234
+ "参数": "type",
235
+ "说明": "分隔类型",
236
+ "类型": "`horizontal | vertical`",
237
+ "默认值": "-"
238
+ }
239
+ ]
240
+ }
241
+ ]
242
+ },
243
+ {
244
+ "packageName": "ProCard",
245
+ "tableData": [
246
+ {
247
+ "title": "ProCard - CheckCard",
248
+ "table": [
249
+ {
250
+ "参数": "checked",
251
+ "说明": "指定当前是否选中",
252
+ "类型": "boolean",
253
+ "默认值": "false"
254
+ },
255
+ {
256
+ "参数": "bordered",
257
+ "说明": "是否显示边框",
258
+ "类型": "boolean",
259
+ "默认值": "true",
260
+ "版本": "1.20.0"
261
+ },
262
+ {
263
+ "参数": "value",
264
+ "说明": "选项值",
265
+ "类型": "string",
266
+ "默认值": "-"
267
+ },
268
+ {
269
+ "参数": "defaultChecked",
270
+ "说明": "初始是否选中",
271
+ "类型": "boolean",
272
+ "默认值": "false"
273
+ },
274
+ {
275
+ "参数": "disabled",
276
+ "说明": "失效状态",
277
+ "类型": "boolean",
278
+ "默认值": "false"
279
+ },
280
+ {
281
+ "参数": "size",
282
+ "说明": "选择框大小,可选 `large` `small`",
283
+ "类型": "string",
284
+ "默认值": "`default`"
285
+ },
286
+ {
287
+ "参数": "onChange",
288
+ "说明": "变化时回调函数",
289
+ "类型": "Function(checked)",
290
+ "默认值": "-"
291
+ },
292
+ {
293
+ "参数": "loading",
294
+ "说明": "当卡片内容还在加载中时,可以用 loading 展示一个占位",
295
+ "类型": "boolean",
296
+ "默认值": "false"
297
+ },
298
+ {
299
+ "参数": "title",
300
+ "说明": "标题",
301
+ "类型": "string | ReactNode",
302
+ "默认值": "-"
303
+ },
304
+ {
305
+ "参数": "description",
306
+ "说明": "描述",
307
+ "类型": "ReactNode",
308
+ "默认值": "-"
309
+ },
310
+ {
311
+ "参数": "avatar",
312
+ "说明": "选项元素的图片地址",
313
+ "类型": "link | ReactNode",
314
+ "默认值": "-"
315
+ },
316
+ {
317
+ "参数": "extra",
318
+ "说明": "动作区域",
319
+ "类型": "卡片右上角的操作区域",
320
+ "默认值": "-"
321
+ },
322
+ {
323
+ "参数": "cover",
324
+ "说明": "卡片背景图片,注意使用该选项后`title`,`description`和`avatar`失效",
325
+ "类型": "ReactNode",
326
+ "默认值": "-"
327
+ }
328
+ ]
329
+ },
330
+ {
331
+ "title": "ProCard - CheckCard.Group",
332
+ "table": [
333
+ {
334
+ "参数": "multiple",
335
+ "说明": "多选",
336
+ "类型": "boolean",
337
+ "默认值": "false"
338
+ },
339
+ {
340
+ "参数": "bordered",
341
+ "说明": "是否显示边框",
342
+ "类型": "boolean",
343
+ "默认值": "true",
344
+ "版本": "1.20.0"
345
+ },
346
+ {
347
+ "参数": "defaultValue",
348
+ "说明": "默认选中的选项",
349
+ "类型": "string | string[]",
350
+ "默认值": "-"
351
+ },
352
+ {
353
+ "参数": "disabled",
354
+ "说明": "整组失效",
355
+ "类型": "boolean",
356
+ "默认值": "false"
357
+ },
358
+ {
359
+ "参数": "loading",
360
+ "说明": "当卡片组内容还在加载中时,可以用 loading 展示一个占位",
361
+ "类型": "boolean",
362
+ "默认值": "false"
363
+ },
364
+ {
365
+ "参数": "options",
366
+ "说明": "指定可选项",
367
+ "类型": "string[] | Array<{ title: ReactNode, value: string, description?: ReactNode, avatar?: link or ReactNode, cover?:ReactNode, disabled?: boolean }>",
368
+ "默认值": "\\[]"
369
+ },
370
+ {
371
+ "参数": "value",
372
+ "说明": "指定选中的选项",
373
+ "类型": "string | string[]",
374
+ "默认值": "-"
375
+ },
376
+ {
377
+ "参数": "size",
378
+ "说明": "选择框大小,可选 `large` `small`",
379
+ "类型": "string",
380
+ "默认值": "`default`"
381
+ },
382
+ {
383
+ "参数": "onChange",
384
+ "说明": "变化时回调函数",
385
+ "类型": "Function(checkedValue)",
386
+ "默认值": "-"
387
+ }
388
+ ]
389
+ }
390
+ ]
391
+ },
392
+ {
393
+ "packageName": "ProCard",
394
+ "tableData": [
395
+ {
396
+ "title": "ProCard - StatisticCard",
397
+ "table": [
398
+ {
399
+ "参数": "title",
400
+ "说明": "卡片标题",
401
+ "类型": "`string|ReactNode`",
402
+ "默认值": "-"
403
+ },
404
+ {
405
+ "参数": "extra",
406
+ "说明": "卡片右上角的操作区域",
407
+ "类型": "`string|ReactNode`",
408
+ "默认值": "-"
409
+ },
410
+ {
411
+ "参数": "loading",
412
+ "说明": "当卡片内容还在加载中时,可以用 loading 展示一个占位",
413
+ "类型": "boolean",
414
+ "默认值": "false"
415
+ },
416
+ {
417
+ "参数": "bordered",
418
+ "说明": "是否有边框",
419
+ "类型": "boolean",
420
+ "默认值": "true"
421
+ },
422
+ {
423
+ "参数": "chart",
424
+ "说明": "图表卡片",
425
+ "类型": "ReactNode",
426
+ "默认值": "-"
427
+ },
428
+ {
429
+ "参数": "statistic",
430
+ "说明": "数值统计配置,布局默认为 `vertical`",
431
+ "类型": "参数见下 Statistic",
432
+ "默认值": "-"
433
+ },
434
+ {
435
+ "参数": "chartPlacement",
436
+ "说明": "图表位置,相对于 statistic 的位置",
437
+ "类型": "`left | right | bottom`",
438
+ "默认值": "-"
439
+ },
440
+ {
441
+ "参数": "footer",
442
+ "说明": "额外指标展示",
443
+ "类型": "`ReactNode`",
444
+ "默认值": "-"
445
+ }
446
+ ]
447
+ },
448
+ {
449
+ "title": "ProCard - Statistic",
450
+ "table": [
451
+ {
452
+ "参数": "prefix",
453
+ "说明": "设置数值的前缀",
454
+ "类型": "string | ReactNode",
455
+ "默认值": "-"
456
+ },
457
+ {
458
+ "参数": "suffix",
459
+ "说明": "设置数值的后缀",
460
+ "类型": "string | ReactNode",
461
+ "默认值": "-"
462
+ },
463
+ {
464
+ "参数": "title",
465
+ "说明": "数值的标题",
466
+ "类型": "string | ReactNode",
467
+ "默认值": "-"
468
+ },
469
+ {
470
+ "参数": "tip",
471
+ "说明": "标题提示",
472
+ "类型": "string| ReactNode",
473
+ "默认值": "-"
474
+ },
475
+ {
476
+ "参数": "value",
477
+ "说明": "数值内容",
478
+ "类型": "string | number",
479
+ "默认值": "-"
480
+ },
481
+ {
482
+ "参数": "icon",
483
+ "说明": "图标",
484
+ "类型": "ReactNode",
485
+ "默认值": "-"
486
+ },
487
+ {
488
+ "参数": "status",
489
+ "说明": "设置状态点,同 Badge 组件",
490
+ "类型": "`Enum{ 'success', 'processing, 'default', 'error', 'warning' }`",
491
+ "默认值": "-"
492
+ },
493
+ {
494
+ "参数": "valueStyle",
495
+ "说明": "设置数值的样式",
496
+ "类型": "style",
497
+ "默认值": "-"
498
+ },
499
+ {
500
+ "参数": "description",
501
+ "说明": "描述性标签",
502
+ "类型": "React.ReactNode | () => React.ReactNode",
503
+ "默认值": "-"
504
+ },
505
+ {
506
+ "参数": "layout",
507
+ "说明": "布局",
508
+ "类型": "`horizontal | vertical | inline`",
509
+ "默认值": "`inline`"
510
+ },
511
+ {
512
+ "参数": "trend",
513
+ "说明": "趋势",
514
+ "类型": "`up | down |`",
515
+ "默认值": "-"
516
+ }
517
+ ]
518
+ },
519
+ {
520
+ "title": "ProCard - Divider",
521
+ "table": [
522
+ {
523
+ "参数": "type",
524
+ "说明": "分隔类型",
525
+ "类型": "`horizontal | vertical`",
526
+ "默认值": "-"
527
+ }
528
+ ]
529
+ }
530
+ ]
531
+ },
532
+ {
533
+ "packageName": "ProDescriptions",
534
+ "tableData": [
535
+ {
536
+ "title": "ProDescriptions - ProDescriptions",
537
+ "table": [
538
+ {
539
+ "参数": "title",
540
+ "说明": "描述列表的标题,显示在最顶部",
541
+ "类型": "`ReactNode`",
542
+ "默认值": "-"
543
+ },
544
+ {
545
+ "参数": "tooltip",
546
+ "说明": "内容的补充描述,hover 后显示",
547
+ "类型": "`string`",
548
+ "默认值": "-"
549
+ },
550
+ {
551
+ "参数": "loading",
552
+ "说明": "展示一个加载的骨架屏,骨架屏和 dom 不会一一对应",
553
+ "类型": "`boolean`",
554
+ "默认值": "-"
555
+ },
556
+ {
557
+ "参数": "extra",
558
+ "说明": "描述列表的操作区域,显示在右上方",
559
+ "类型": "`string` | `ReactNode`",
560
+ "默认值": "-"
561
+ },
562
+ {
563
+ "参数": "bordered",
564
+ "说明": "是否展示边框",
565
+ "类型": "boolean",
566
+ "默认值": "false"
567
+ },
568
+ {
569
+ "参数": "column",
570
+ "说明": "一行的 `ProDescriptionsItems` 数量,可以写成像素值或支持响应式的对象写法 `{ xs: 1, sm: 2, md: 3}`",
571
+ "类型": "number",
572
+ "默认值": "3"
573
+ },
574
+ {
575
+ "参数": "size",
576
+ "说明": "设置列表的大小。可以设置为 `middle` 、`small`,或不填(只有设置 `bordered={true}` 生效)",
577
+ "类型": "`default` | `middle` | `small`",
578
+ "默认值": "-"
579
+ },
580
+ {
581
+ "参数": "layout",
582
+ "说明": "描述布局",
583
+ "类型": "`horizontal` | `vertical`",
584
+ "默认值": "`horizontal`"
585
+ },
586
+ {
587
+ "参数": "colon",
588
+ "说明": "配置 `ProDescriptions.Item` 的 `colon` 的默认值",
589
+ "类型": "boolean",
590
+ "默认值": "true"
591
+ },
592
+ {
593
+ "参数": "request",
594
+ "说明": "请求数据,不设置 columns 时 ProDescriptions.Item 需设置对应的 dataIndex",
595
+ "类型": "-",
596
+ "默认值": "-"
597
+ },
598
+ {
599
+ "参数": "onRequestError",
600
+ "说明": "处理 request 的错误,默认会直接抛出错误",
601
+ "类型": "-",
602
+ "默认值": "-"
603
+ },
604
+ {
605
+ "参数": "columns",
606
+ "说明": "列定义,与 request 配合使用 [columns](/components/table#columns)",
607
+ "类型": "-",
608
+ "默认值": "-"
609
+ },
610
+ {
611
+ "参数": "editable",
612
+ "说明": "编辑的相关配置",
613
+ "类型": "-"
614
+ }
615
+ ]
616
+ },
617
+ {
618
+ "title": "ProDescriptions - editable 编辑配置",
619
+ "table": [
620
+ {
621
+ "属性": "form",
622
+ "描述": "可编辑表格的 form 实例,使用 `Form.useForm` 生成后使用",
623
+ "类型": "`FormInstance`",
624
+ "默认值": "-"
625
+ },
626
+ {
627
+ "属性": "formProps",
628
+ "描述": "可以配置 form 的属性,但是不支持 onFinish",
629
+ "类型": "-"
630
+ },
631
+ {
632
+ "属性": "editableKeys",
633
+ "描述": "正在编辑的行,受控属性。 默认 `key` 会使用 `rowKey` 的配置,如果没有配置会使用 `index`,建议使用 rowKey",
634
+ "类型": "`Key[]`",
635
+ "默认值": "-"
636
+ },
637
+ {
638
+ "属性": "onChange",
639
+ "描述": "行数据被修改的时候触发",
640
+ "类型": "`(editableKeys: Key[], editableRows: T[]) => void`",
641
+ "默认值": "-"
642
+ },
643
+ {
644
+ "属性": "onSave",
645
+ "描述": "保存一行的时候触发",
646
+ "类型": "`(key: Key, row: T,originRow:T,newLine?:newLineConfig) => Promise<any>`",
647
+ "默认值": "-"
648
+ },
649
+ {
650
+ "属性": "saveText",
651
+ "描述": "保存一行的文字",
652
+ "类型": "`React.ReactNode`",
653
+ "默认值": "`保存`"
654
+ },
655
+ {
656
+ "属性": "onDelete",
657
+ "描述": "删除一行的时候触发",
658
+ "类型": "`(key: Key, row: T) => Promise<any>`",
659
+ "默认值": "-"
660
+ },
661
+ {
662
+ "属性": "deleteText",
663
+ "描述": "删除一行的文字",
664
+ "类型": "`React.ReactNode`",
665
+ "默认值": "`删除`"
666
+ },
667
+ {
668
+ "属性": "onCancel",
669
+ "描述": "取消编辑一行时触发",
670
+ "类型": "`(key: Key, row: T,originRow:T,newLine?:newLineConfig) => Promise<any>`",
671
+ "默认值": "-"
672
+ },
673
+ {
674
+ "属性": "cancelText",
675
+ "描述": "取消编辑一行的文字",
676
+ "类型": "`React.ReactNode`",
677
+ "默认值": "`取消`"
678
+ },
679
+ {
680
+ "属性": "actionRender",
681
+ "描述": "自定义编辑模式的操作栏",
682
+ "类型": "`(row: T, config: ActionRenderConfig,defaultDom) => ReactNode[]`",
683
+ "默认值": "-"
684
+ },
685
+ {
686
+ "属性": "deletePopconfirmMessage",
687
+ "描述": "删除时弹出的确认框提示消息",
688
+ "类型": "`ReactNode`",
689
+ "默认值": "`删除此项?`"
690
+ },
691
+ {
692
+ "属性": "onlyOneLineEditorAlertMessage",
693
+ "描述": "只能编辑一行的的提示",
694
+ "类型": "`ReactNode`",
695
+ "默认值": "`只能同时编辑一行`"
696
+ },
697
+ {
698
+ "属性": "onlyAddOneLineAlertMessage",
699
+ "描述": "只能同时新增一行的提示",
700
+ "类型": "`ReactNode`",
701
+ "默认值": "`只能新增一行`"
702
+ }
703
+ ]
704
+ },
705
+ {
706
+ "title": "ProDescriptions - ProDescriptions.Item",
707
+ "table": [
708
+ {
709
+ "参数": "label",
710
+ "说明": "内容的描述",
711
+ "类型": "ReactNode",
712
+ "默认值": "-"
713
+ },
714
+ {
715
+ "参数": "tooltip",
716
+ "说明": "内容的补充描述,hover 后显示",
717
+ "类型": "string",
718
+ "默认值": "-"
719
+ },
720
+ {
721
+ "参数": "ellipsis",
722
+ "说明": "是否自动缩略",
723
+ "类型": "`boolean`",
724
+ "默认值": "-"
725
+ },
726
+ {
727
+ "参数": "copyable",
728
+ "说明": "是否支持复制",
729
+ "类型": "`boolean`",
730
+ "默认值": "-"
731
+ },
732
+ {
733
+ "参数": "span",
734
+ "说明": "包含列的数量",
735
+ "类型": "number",
736
+ "默认值": "1"
737
+ },
738
+ {
739
+ "参数": "valueType",
740
+ "说明": "格式化的类型",
741
+ "类型": "`ValueType`",
742
+ "默认值": "-"
743
+ },
744
+ {
745
+ "参数": "valueEnum",
746
+ "说明": "当前列值的枚举 [valueEnum](/components/table#valueenum)",
747
+ "类型": "`Record`",
748
+ "默认值": "-"
749
+ },
750
+ {
751
+ "参数": "request",
752
+ "说明": "从网络请求枚举数据",
753
+ "类型": "`()=>Promise<{[key:string`|`number]:any}>`",
754
+ "默认值": "-"
755
+ },
756
+ {
757
+ "参数": "dataIndex",
758
+ "说明": "返回数据的 key 与 ProDescriptions 的 request 配合使用,用于配置式的定义列表",
759
+ "类型": "`React.Text` | `React.Text[]`",
760
+ "默认值": "-"
761
+ },
762
+ {
763
+ "参数": "editable",
764
+ "说明": "在编辑表格中是否可编辑的,函数的参数和 table 的 render 一样",
765
+ "类型": "`false` | `(text: any, record: T,index: number) => boolean`",
766
+ "默认值": "true"
767
+ }
768
+ ]
769
+ }
770
+ ]
771
+ },
772
+ {
773
+ "packageName": "ProField",
774
+ "tableData": [
775
+ {
776
+ "title": "ProField - 参数",
777
+ "table": [
778
+ {
779
+ "参数": "text",
780
+ "说明": "需要格式化的值",
781
+ "类型": "any",
782
+ "默认值": "-"
783
+ },
784
+ {
785
+ "参数": "valueType",
786
+ "说明": "格式化的类型",
787
+ "类型": "ValueType",
788
+ "默认值": "-"
789
+ },
790
+ {
791
+ "参数": "mode",
792
+ "说明": "组件的模式",
793
+ "类型": "-",
794
+ "默认值": "-"
795
+ },
796
+ {
797
+ "参数": "plain",
798
+ "说明": "精简模式",
799
+ "类型": "-",
800
+ "默认值": "-"
801
+ },
802
+ {
803
+ "参数": "renderFormItem",
804
+ "说明": "自定义 `mode=update | edit` 下的 dom 表现,一般用于渲染编辑框",
805
+ "类型": "-",
806
+ "默认值": "-"
807
+ },
808
+ {
809
+ "参数": "render",
810
+ "说明": "自定义 `mode=read` 下的 dom 表现,只是单纯的表现形式",
811
+ "类型": "-",
812
+ "默认值": "-"
813
+ }
814
+ ]
815
+ }
816
+ ]
817
+ },
818
+ {
819
+ "packageName": "ProForm",
820
+ "tableData": []
821
+ },
822
+ {
823
+ "packageName": "ProForm",
824
+ "tableData": [
825
+ {
826
+ "title": "ProForm - 组件列表",
827
+ "table": [
828
+ {
829
+ "组件": "用于输入各类文本"
830
+ },
831
+ {
832
+ "组件": "用于输入数字,它自带了一个格式化 (保留 2 位小数,最小值为 0),有需要你可以关掉它。"
833
+ },
834
+ {
835
+ "组件": "用于输入密码"
836
+ },
837
+ {
838
+ "组件": "用于输入多行文本"
839
+ },
840
+ {
841
+ "组件": "ProFormCaptcha",
842
+ "使用场景": "用于输入验证码, 一般需要与发送验证码接口一起使用"
843
+ },
844
+ {
845
+ "组件": "日期选择器用于输入日期"
846
+ },
847
+ {
848
+ "组件": "日期 + 时间选择器,用于输入日期和时间"
849
+ },
850
+ {
851
+ "组件": "日期区间选择器用于输入一个日期区间"
852
+ },
853
+ {
854
+ "组件": "日期 + 时间区间选择器,用于输入一个日期 + 时间的区间"
855
+ },
856
+ {
857
+ "组件": "支持 `request` 和 `valueEnum` 两种方式来生成子项,用于从两项以上中选择一项"
858
+ },
859
+ {
860
+ "组件": "支持 `request` 和 `valueEnum` 两种方式来生成子项,用于从两项以上中选择一项"
861
+ },
862
+ {
863
+ "组件": "在 Checkbox 基础上支持了 layout,也支持 `request` 和 `valueEnum` 两种方式来生成子项"
864
+ },
865
+ {
866
+ "组件": "在 Radio 基础上也支持 `request` 和 `valueEnum` 两种方式来生成子项,用于单选某项,但是可以展示出来所有选项。"
867
+ },
868
+ {
869
+ "组件": "当用户需要在数值区间 / 自定义区间内进行选择时,可为连续或离散值。"
870
+ },
871
+ {
872
+ "组件": "用于输入互斥的两个选项,一般是 true 和 false"
873
+ },
874
+ {
875
+ "组件": "按钮样式的上传文件"
876
+ },
877
+ {
878
+ "组件": "区域的上传文件,一般用于突出上传文件的表单中"
879
+ },
880
+ {
881
+ "组件": "ProFormMoney",
882
+ "使用场景": "通用金额输入组件"
883
+ },
884
+ {
885
+ "组件": "分段控制器"
886
+ }
887
+ ]
888
+ },
889
+ {
890
+ "title": "ProForm - 通用的属性",
891
+ "table": [
892
+ {
893
+ "参数": "width",
894
+ "说明": "Field 的长度,我们归纳了常用的 Field 长度以及适合的场景,支持了一些枚举 \"xs\" , \"sm\" , \"md\" ,\"lg\" , \"xl\"",
895
+ "类型": "`number | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\"`",
896
+ "默认值": "-"
897
+ },
898
+ {
899
+ "参数": "rowProps",
900
+ "说明": "开启 `grid` 模式时传递给 Row, 仅在`ProFormGroup`, `ProFormList`, `ProFormFieldSet` 中有效",
901
+ "类型": "{ gutter: 8 }"
902
+ },
903
+ {
904
+ "参数": "colProps",
905
+ "说明": "开启 `grid` 模式时传递给 Col",
906
+ "类型": "{ xs: 24 }"
907
+ },
908
+ {
909
+ "参数": "tooltip",
910
+ "说明": "会在 label 旁增加一个 icon,悬浮后展示配置的信息",
911
+ "类型": "`string | tooltipProps`",
912
+ "默认值": "-"
913
+ },
914
+ {
915
+ "参数": "secondary",
916
+ "说明": "是否是次要控件,只针对 LightFilter 下有效",
917
+ "类型": "`boolean`",
918
+ "默认值": "`false`"
919
+ },
920
+ {
921
+ "参数": "allowClear",
922
+ "说明": "支持清除,针对 LightFilter 下有效,主动设置情况下同时也会透传给 `fieldProps`",
923
+ "类型": "`boolean`",
924
+ "默认值": "`true`"
925
+ }
926
+ ]
927
+ },
928
+ {
929
+ "title": "ProForm - ProFormCaptcha",
930
+ "table": [
931
+ {
932
+ "参数": "onGetCaptcha",
933
+ "说明": "点击获取验证码的事件,如果配置了 phoneName 会自动注入",
934
+ "类型": "`(phone)=>Promise<any>`",
935
+ "默认值": "-"
936
+ },
937
+ {
938
+ "参数": "onTiming",
939
+ "说明": "计时数字监听",
940
+ "类型": "`(count: number)=>void`",
941
+ "默认值": "-"
942
+ },
943
+ {
944
+ "参数": "captchaProps",
945
+ "说明": "获取验证码按钮的 props,与 antd 的 props 相同",
946
+ "类型": "`ButtonProps`",
947
+ "默认值": "-"
948
+ },
949
+ {
950
+ "参数": "countDown",
951
+ "说明": "倒计时的秒数",
952
+ "类型": "number",
953
+ "默认值": "60"
954
+ },
955
+ {
956
+ "参数": "captchaTextRender",
957
+ "说明": "渲染计时的文案",
958
+ "类型": "`(timing: boolean, count: number) => React.ReactNode`",
959
+ "默认值": "-"
960
+ }
961
+ ]
962
+ },
963
+ {
964
+ "title": "ProForm - ProFormSelect",
965
+ "table": [
966
+ {
967
+ "参数": "valueEnum",
968
+ "说明": "当前列值的枚举 [valueEnum](/components/table#valueenum)",
969
+ "类型": "`Record`",
970
+ "默认值": "-"
971
+ },
972
+ {
973
+ "参数": "request",
974
+ "说明": "从网络请求枚举数据",
975
+ "类型": "`()=>Promise<{label,value}>`",
976
+ "默认值": "-"
977
+ },
978
+ {
979
+ "参数": "debounceTime",
980
+ "说明": "防抖动时间,与 request 配合使用",
981
+ "类型": "`number`",
982
+ "默认值": "-"
983
+ },
984
+ {
985
+ "参数": "params",
986
+ "说明": "发起网络请求的参数,与 request 配合使用",
987
+ "类型": "`Record`",
988
+ "默认值": "-"
989
+ },
990
+ {
991
+ "参数": "fieldProps",
992
+ "说明": "antd 组件的 props",
993
+ "类型": "`SelectProps `",
994
+ "默认值": "-"
995
+ }
996
+ ]
997
+ },
998
+ {
999
+ "title": "ProForm - ProFormTreeSelect",
1000
+ "table": [
1001
+ {
1002
+ "参数": "valueEnum",
1003
+ "说明": "当前列值的枚举 [valueEnum](/components/table#valueenum)",
1004
+ "类型": "`Record`",
1005
+ "默认值": "-"
1006
+ },
1007
+ {
1008
+ "参数": "request",
1009
+ "说明": "从网络请求枚举数据",
1010
+ "类型": "`()=>Promise<{label,value}>`",
1011
+ "默认值": "-"
1012
+ },
1013
+ {
1014
+ "参数": "debounceTime",
1015
+ "说明": "防抖动时间,与 request 配合使用",
1016
+ "类型": "`number`",
1017
+ "默认值": "-"
1018
+ },
1019
+ {
1020
+ "参数": "params",
1021
+ "说明": "发起网络请求的参数,与 request 配合使用",
1022
+ "类型": "`Record`",
1023
+ "默认值": "-"
1024
+ },
1025
+ {
1026
+ "参数": "fieldProps",
1027
+ "说明": "antd 组件的 props",
1028
+ "类型": "`TreeSelectProps`",
1029
+ "默认值": "-"
1030
+ }
1031
+ ]
1032
+ },
1033
+ {
1034
+ "title": "ProForm - ProFormCheckbox",
1035
+ "table": [
1036
+ {
1037
+ "参数": "options",
1038
+ "说明": "与 select 相同,根据 options 生成子节点,推荐使用。",
1039
+ "类型": "`string[]` | `{label:ReactNode,value:string}[]`",
1040
+ "默认值": "-"
1041
+ },
1042
+ {
1043
+ "参数": "layout",
1044
+ "说明": "配置 checkbox 的样子,支持垂直`vertical` 和 `horizontal`",
1045
+ "类型": "`horizontal` | `vertical`",
1046
+ "默认值": "-"
1047
+ },
1048
+ {
1049
+ "参数": "request",
1050
+ "说明": "从网络请求枚举数据",
1051
+ "类型": "`()=>Promise<{label,value}>`",
1052
+ "默认值": "-"
1053
+ },
1054
+ {
1055
+ "参数": "params",
1056
+ "说明": "发起网络请求的参数,与 request 配合使用",
1057
+ "类型": "`Record`",
1058
+ "默认值": "-"
1059
+ },
1060
+ {
1061
+ "参数": "fieldProps",
1062
+ "说明": "antd 组件的 props",
1063
+ "类型": "`CheckboxProps`",
1064
+ "默认值": "-"
1065
+ }
1066
+ ]
1067
+ },
1068
+ {
1069
+ "title": "ProForm - ProFormRadio.Group",
1070
+ "table": [
1071
+ {
1072
+ "参数": "options",
1073
+ "说明": "与 select 相同,根据 options 生成子节点,推荐使用。",
1074
+ "类型": "`string[]` | `{label:ReactNode,value:string}[]`",
1075
+ "默认值": "-"
1076
+ },
1077
+ {
1078
+ "参数": "request",
1079
+ "说明": "从网络请求枚举数据",
1080
+ "类型": "`()=>Promise<{label,value}>`",
1081
+ "默认值": "-"
1082
+ },
1083
+ {
1084
+ "参数": "radioType",
1085
+ "说明": "设置是按钮模式还是 radio 模式",
1086
+ "类型": "`default`|`button`",
1087
+ "默认值": "`default`"
1088
+ },
1089
+ {
1090
+ "参数": "params",
1091
+ "说明": "发起网络请求的参数,与 request 配合使用",
1092
+ "类型": "`Record`",
1093
+ "默认值": "-"
1094
+ },
1095
+ {
1096
+ "参数": "fieldProps",
1097
+ "说明": "antd 组件的 props",
1098
+ "类型": "`RadioProps`",
1099
+ "默认值": "-"
1100
+ }
1101
+ ]
1102
+ },
1103
+ {
1104
+ "title": "ProForm - ProFormCascader",
1105
+ "table": [
1106
+ {
1107
+ "参数": "options",
1108
+ "说明": "与 cascader 相同,根据 options 生成子节点,推荐使用。",
1109
+ "类型": "`string[]` | `{label:ReactNode,value:string}[]`",
1110
+ "默认值": "-"
1111
+ },
1112
+ {
1113
+ "参数": "request",
1114
+ "说明": "从网络请求枚举数据",
1115
+ "类型": "`()=>Promise<{label,value}>`",
1116
+ "默认值": "-"
1117
+ },
1118
+ {
1119
+ "参数": "params",
1120
+ "说明": "发起网络请求的参数,与 request 配合使用",
1121
+ "类型": "`Record`",
1122
+ "默认值": "-"
1123
+ },
1124
+ {
1125
+ "参数": "fieldProps",
1126
+ "说明": "antd 组件的 props",
1127
+ "类型": "`CascaderProps`",
1128
+ "默认值": "-"
1129
+ }
1130
+ ]
1131
+ },
1132
+ {
1133
+ "title": "ProForm - ProFormSwitch",
1134
+ "table": [
1135
+ {
1136
+ "参数": "fieldProps",
1137
+ "说明": "antd 组件的 props",
1138
+ "类型": "`SwitchProps`",
1139
+ "默认值": "-"
1140
+ }
1141
+ ]
1142
+ },
1143
+ {
1144
+ "title": "ProForm - ProFormRate",
1145
+ "table": [
1146
+ {
1147
+ "参数": "fieldProps",
1148
+ "说明": "antd 组件的 props",
1149
+ "类型": "`RateProps`",
1150
+ "默认值": "-"
1151
+ }
1152
+ ]
1153
+ },
1154
+ {
1155
+ "title": "ProForm - ProFormSlider",
1156
+ "table": [
1157
+ {
1158
+ "参数": "fieldProps",
1159
+ "说明": "antd 组件的 props",
1160
+ "类型": "`SliderProps`",
1161
+ "默认值": "-"
1162
+ }
1163
+ ]
1164
+ },
1165
+ {
1166
+ "title": "ProForm - ProFormUploadDragger",
1167
+ "table": [
1168
+ {
1169
+ "参数": "icon",
1170
+ "说明": "Dragger 的图标",
1171
+ "类型": "`ReactNode`",
1172
+ "默认值": "InboxOutlined"
1173
+ },
1174
+ {
1175
+ "参数": "title",
1176
+ "说明": "Dragger 的标题",
1177
+ "类型": "`ReactNode`",
1178
+ "默认值": "' 单击或拖动文件到此区域进行上传'"
1179
+ },
1180
+ {
1181
+ "参数": "description",
1182
+ "说明": "Dragger 的描述",
1183
+ "类型": "`ReactNode`",
1184
+ "默认值": "' 支持单次或批量上传'"
1185
+ }
1186
+ ]
1187
+ },
1188
+ {
1189
+ "title": "ProForm - ProFormUploadButton",
1190
+ "table": [
1191
+ {
1192
+ "参数": "icon",
1193
+ "说明": "Button 的图标",
1194
+ "类型": "`ReactNode`",
1195
+ "默认值": "UploadOutlined"
1196
+ },
1197
+ {
1198
+ "参数": "title",
1199
+ "说明": "Button 的标题",
1200
+ "类型": "`ReactNode`",
1201
+ "默认值": "单击上传"
1202
+ },
1203
+ {
1204
+ "参数": "max",
1205
+ "说明": "最大上传数量,超过最大数量就会隐藏上传按钮",
1206
+ "类型": "`number`",
1207
+ "默认值": "-"
1208
+ }
1209
+ ]
1210
+ },
1211
+ {
1212
+ "title": "ProForm - ProFormMoney",
1213
+ "table": [
1214
+ {
1215
+ "参数": "locale",
1216
+ "说明": "单独设置的国际化地区值,根据不同的地区显示不同的货币符号,支持地区详见下面的地区目录",
1217
+ "类型": "`string`",
1218
+ "默认值": "`zh-Hans-CN`"
1219
+ },
1220
+ {
1221
+ "参数": "customSymbol",
1222
+ "说明": "自定义金额符号",
1223
+ "类型": "`string`",
1224
+ "默认值": "-"
1225
+ },
1226
+ {
1227
+ "参数": "numberPopoverRender",
1228
+ "说明": "自定义 Popover 的值,false 可以关闭他",
1229
+ "类型": "`((props: InputNumberProps, defaultText: string) => React.ReactNode)`| `boolean`",
1230
+ "默认值": "false"
1231
+ },
1232
+ {
1233
+ "参数": "numberFormatOptions",
1234
+ "说明": "NumberFormat 的配置,文档可以查看 [mdn](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat)",
1235
+ "类型": "NumberFormatOptions",
1236
+ "默认值": "-"
1237
+ },
1238
+ {
1239
+ "参数": "min",
1240
+ "说明": "最小值",
1241
+ "类型": "`number`",
1242
+ "默认值": "-"
1243
+ },
1244
+ {
1245
+ "参数": "max",
1246
+ "说明": "最大值",
1247
+ "类型": "`number`",
1248
+ "默认值": "-"
1249
+ }
1250
+ ]
1251
+ },
1252
+ {
1253
+ "title": "ProForm - ProFormSegmented",
1254
+ "table": [
1255
+ {
1256
+ "参数": "valueEnum",
1257
+ "说明": "当前列值的枚举 [valueEnum](/components/table#valueenum)",
1258
+ "类型": "`Record`",
1259
+ "默认值": "-"
1260
+ },
1261
+ {
1262
+ "参数": "request",
1263
+ "说明": "从网络请求枚举数据",
1264
+ "类型": "`()=>Promise<{label,value}>`",
1265
+ "默认值": "-"
1266
+ },
1267
+ {
1268
+ "参数": "debounceTime",
1269
+ "说明": "防抖动时间,与 request 配合使用",
1270
+ "类型": "`number`",
1271
+ "默认值": "-"
1272
+ },
1273
+ {
1274
+ "参数": "params",
1275
+ "说明": "发起网络请求的参数,与 request 配合使用",
1276
+ "类型": "`Record`",
1277
+ "默认值": "-"
1278
+ },
1279
+ {
1280
+ "参数": "fieldProps",
1281
+ "说明": "antd 组件的 props",
1282
+ "类型": "`Segmented`",
1283
+ "默认值": "-"
1284
+ }
1285
+ ]
1286
+ }
1287
+ ]
1288
+ },
1289
+ {
1290
+ "packageName": "ProForm",
1291
+ "tableData": [
1292
+ {
1293
+ "title": "ProForm - 何时使用 ProForm?",
1294
+ "table": [
1295
+ {
1296
+ "布局": "标准 Form,增加了 `onFinish` 中自动 `loading` 和根据 `request` 自动获取默认值的功能。"
1297
+ },
1298
+ {
1299
+ "布局": "在 ProForm 的基础上增加了 `trigger` ,无需维护 `visible` 状态。"
1300
+ },
1301
+ {
1302
+ "布局": "一般用于作为筛选表单,需要配合其他数据展示组件使用。"
1303
+ },
1304
+ {
1305
+ "布局": "一般用于作为行内内置的筛选,比如卡片操作栏和表格操作栏。"
1306
+ },
1307
+ {
1308
+ "布局": "分步表单,需要配置 StepForm 使用。"
1309
+ }
1310
+ ]
1311
+ },
1312
+ {
1313
+ "title": "ProForm - ProForm",
1314
+ "table": [
1315
+ {
1316
+ "参数": "onFinish",
1317
+ "说明": "提交表单且数据验证成功后回调事件,同 antd 4 `Form` 组件 API",
1318
+ "类型": "`(values)=>Promise<void>`",
1319
+ "默认值": "-"
1320
+ },
1321
+ {
1322
+ "参数": "onReset",
1323
+ "说明": "点击重置按钮的回调",
1324
+ "类型": "`(e)=>void`",
1325
+ "默认值": "-"
1326
+ },
1327
+ {
1328
+ "参数": "submitter",
1329
+ "说明": "提交按钮相关配置",
1330
+ "类型": "`boolean` | `SubmitterProps`",
1331
+ "默认值": "`true`"
1332
+ },
1333
+ {
1334
+ "参数": "syncToUrl",
1335
+ "说明": "同步参数到 url 上,url 只支持 string,在使用之前最好读一下[url 中的参数类型](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams)",
1336
+ "类型": "`true` | `(values,type)=>values`",
1337
+ "默认值": "-"
1338
+ },
1339
+ {
1340
+ "参数": "syncToInitialValues",
1341
+ "说明": "同步结果到 initialValues,默认为 true,如果为 false,form.reset 的时候将会忽略从 url 上获取的数据",
1342
+ "类型": "`boolean`",
1343
+ "默认值": "`true`"
1344
+ },
1345
+ {
1346
+ "参数": "dateFormatter",
1347
+ "说明": "自动格式化数据,主要是 moment 的表单,支持 string 和 number 两种模式,此外还支持指定函数进行格式化。",
1348
+ "类型": "`string| number | ((value: Moment, valueType: string) => string | number) | false`",
1349
+ "默认值": "string"
1350
+ },
1351
+ {
1352
+ "参数": "omitNil",
1353
+ "说明": "ProForm 会自动清空 null 和 undefined 的数数据,如果你约定了 nil 代表某种数据,可以设置为 false 关闭此功能",
1354
+ "类型": "`boolean`",
1355
+ "默认值": "true"
1356
+ },
1357
+ {
1358
+ "参数": "params",
1359
+ "说明": "发起网络请求的参数,与 request 配合使用",
1360
+ "类型": "`Record`",
1361
+ "默认值": "-"
1362
+ },
1363
+ {
1364
+ "参数": "request",
1365
+ "说明": "发起网络请求的参数,返回值会覆盖给 initialValues",
1366
+ "类型": "`(params)=>Promise<data>`",
1367
+ "默认值": "-"
1368
+ },
1369
+ {
1370
+ "参数": "isKeyPressSubmit",
1371
+ "说明": "是否使用回车提交",
1372
+ "类型": "`boolean`",
1373
+ "默认值": "-"
1374
+ },
1375
+ {
1376
+ "参数": "formRef",
1377
+ "说明": "获取表单所使用的 form",
1378
+ "类型": "`MutableRefObject<Instance<T>>`",
1379
+ "默认值": "-"
1380
+ },
1381
+ {
1382
+ "参数": "autoFocusFirstInput",
1383
+ "说明": "自动 focus 表单第一个输入框",
1384
+ "类型": "`boolean`",
1385
+ "默认值": "-"
1386
+ },
1387
+ {
1388
+ "参数": "`grid`",
1389
+ "说明": "开启栅格化模式,宽度默认百分比,请使用 `colProps` 控制宽度 [查看示例](/components/form#栅格化布局)",
1390
+ "类型": "`boolean`",
1391
+ "默认值": "-"
1392
+ },
1393
+ {
1394
+ "参数": "rowProps",
1395
+ "说明": "开启 `grid` 模式时传递给 `Row`, 仅在`ProFormGroup`, `ProFormList`, `ProFormFieldSet` 中有效",
1396
+ "类型": "{ gutter: 8 }"
1397
+ },
1398
+ {
1399
+ "参数": "注意 `LightFilter` 和 `QueryFilter` 仅支持除 `wrapperCol` | `labelCol` | `layout` 外的其他 antd `Form` 组件参数",
1400
+ "说明": "-",
1401
+ "类型": "-"
1402
+ }
1403
+ ]
1404
+ },
1405
+ {
1406
+ "title": "ProForm - ProForm.Group",
1407
+ "table": [
1408
+ {
1409
+ "参数": "title",
1410
+ "说明": "标题",
1411
+ "类型": "`string`",
1412
+ "默认值": "-"
1413
+ },
1414
+ {
1415
+ "参数": "children",
1416
+ "说明": "表单控件或者其他元素",
1417
+ "类型": "`React.ReactNode`",
1418
+ "默认值": "-"
1419
+ }
1420
+ ]
1421
+ },
1422
+ {
1423
+ "title": "ProForm - submitter",
1424
+ "table": [
1425
+ {
1426
+ "参数": "onSubmit",
1427
+ "说明": "提交方法",
1428
+ "类型": "`()=>void`",
1429
+ "默认值": "-"
1430
+ },
1431
+ {
1432
+ "参数": "onReset",
1433
+ "说明": "重置方法",
1434
+ "类型": "`()=>void`",
1435
+ "默认值": "-"
1436
+ },
1437
+ {
1438
+ "参数": "searchConfig",
1439
+ "说明": "搜索的配置,一般用来配置文本",
1440
+ "类型": "`{resetText,submitText}`",
1441
+ "默认值": "-"
1442
+ },
1443
+ {
1444
+ "参数": "submitButtonProps",
1445
+ "说明": "提交按钮的 props",
1446
+ "类型": "-"
1447
+ },
1448
+ {
1449
+ "参数": "resetButtonProps",
1450
+ "说明": "重置按钮的 props",
1451
+ "类型": "-"
1452
+ },
1453
+ {
1454
+ "参数": "render",
1455
+ "说明": "自定义操作的渲染",
1456
+ "类型": "`false`|`(props,dom:JSX[])=>ReactNode[]`",
1457
+ "默认值": "-"
1458
+ }
1459
+ ]
1460
+ },
1461
+ {
1462
+ "title": "ProForm - formRef",
1463
+ "table": [
1464
+ {
1465
+ "方法名": "`getFieldsFormatValue`",
1466
+ "使用描述": "使用方法与 `FormInstance` 的 `getFieldsValue` 方法相同,将返回格式化后的所有数据"
1467
+ },
1468
+ {
1469
+ "方法名": "`getFieldFormatValue`",
1470
+ "使用描述": "使用方法与 `FormInstance` 的 `getFieldValue` 方法相同,将返回格式化后的指定数据"
1471
+ },
1472
+ {
1473
+ "方法名": "`validateFieldsReturnFormatValue`",
1474
+ "使用描述": "使用方法与 `FormInstance` 的 `validateFields` 方法相同,验证通过后将返回格式化后的所有数据"
1475
+ }
1476
+ ]
1477
+ }
1478
+ ]
1479
+ },
1480
+ {
1481
+ "packageName": "ProForm",
1482
+ "tableData": [
1483
+ {
1484
+ "title": "ProForm - ProFormList API",
1485
+ "table": [
1486
+ {
1487
+ "参数": "itemRender",
1488
+ "说明": "自定义 Item,可以用来将 action 放到别的地方",
1489
+ "类型": "`(doms,listMeta)=> ReactNode`",
1490
+ "默认值": "-"
1491
+ },
1492
+ {
1493
+ "参数": "creatorRecord",
1494
+ "说明": "新建一行的默认值",
1495
+ "类型": "`Record<string, any> | () => Record<string, any>`",
1496
+ "默认值": "-"
1497
+ },
1498
+ {
1499
+ "参数": "creatorButtonProps",
1500
+ "说明": "新建一行按钮的配置",
1501
+ "类型": "`buttonProps & { creatorButtonText:string,position:\"top\"|\"bottom\" }`",
1502
+ "默认值": "`{creatorButtonText:\"新建一行\"}`"
1503
+ },
1504
+ {
1505
+ "参数": "label",
1506
+ "说明": "与 From.Item 相同",
1507
+ "类型": "`ReactNode`",
1508
+ "默认值": "-"
1509
+ },
1510
+ {
1511
+ "参数": "name",
1512
+ "说明": "list 在 form 中的值,必填项",
1513
+ "类型": "`NamePath`",
1514
+ "默认值": "-"
1515
+ },
1516
+ {
1517
+ "参数": "alwaysShowItemLabel",
1518
+ "说明": "Item 中总是展示 label",
1519
+ "类型": "`boolean`",
1520
+ "默认值": "-"
1521
+ },
1522
+ {
1523
+ "参数": "actionRef",
1524
+ "说明": "当前 List 的自带操作,可以增删改查列表项",
1525
+ "类型": "`{add,remove,move,get}`",
1526
+ "默认值": "-"
1527
+ },
1528
+ {
1529
+ "参数": "actionGuard",
1530
+ "说明": "FormItem 的拦截器,包含删除和添加的拦截,可以用 actionRef 拿到当前行的值",
1531
+ "类型": "`{beforeAddRow:(index)=>boolean,beforeRemoveRow:(index)=>boolean}`",
1532
+ "默认值": "-"
1533
+ },
1534
+ {
1535
+ "参数": "min",
1536
+ "说明": "最少条目,删除时如果当前数据条目少于该数则无法删除",
1537
+ "类型": "`number`",
1538
+ "默认值": "-"
1539
+ },
1540
+ {
1541
+ "参数": "max",
1542
+ "说明": "最多条目,新增或复制时如果当前数据条目多于该数则无法新增或复制",
1543
+ "类型": "`number`",
1544
+ "默认值": "-"
1545
+ },
1546
+ {
1547
+ "参数": "copyIconProps",
1548
+ "说明": "复制按钮的配置,false 可以取消",
1549
+ "类型": "`{ Icon?: React.FC<any>; tooltipText?: string; } | false`",
1550
+ "默认值": "-"
1551
+ },
1552
+ {
1553
+ "参数": "deleteIconProps",
1554
+ "说明": "删除按钮的配置,false 可以取消",
1555
+ "类型": "`{ Icon?: React.FC<any>; tooltipText?: string; } | false`",
1556
+ "默认值": "-"
1557
+ },
1558
+ {
1559
+ "参数": "actionRender",
1560
+ "说明": "自定义操作按钮",
1561
+ "类型": "`(field,action,defaultActionDom,count)=>React.ReactNode[]`",
1562
+ "默认值": "-"
1563
+ },
1564
+ {
1565
+ "参数": "onAfterAdd",
1566
+ "说明": "新增数据后的钩子",
1567
+ "类型": "`(defaultValue: StoreValue, insertIndex: number, count: number) => void`",
1568
+ "默认值": "-"
1569
+ },
1570
+ {
1571
+ "参数": "onAfterRemove",
1572
+ "说明": "删除数据后的钩子",
1573
+ "类型": "`(index: number, count: number) => void`",
1574
+ "默认值": "-"
1575
+ }
1576
+ ]
1577
+ }
1578
+ ]
1579
+ },
1580
+ {
1581
+ "packageName": "ProForm",
1582
+ "tableData": [
1583
+ {
1584
+ "title": "ProForm - LoginForm",
1585
+ "table": [
1586
+ {
1587
+ "参数": "logo",
1588
+ "说明": "logo 的配置,支持 ReactNode 和 string",
1589
+ "类型": "`ReactNode | url`",
1590
+ "默认值": "-"
1591
+ },
1592
+ {
1593
+ "参数": "title",
1594
+ "说明": "标题,可以配置为空",
1595
+ "类型": "`ReactNode`",
1596
+ "默认值": "-"
1597
+ },
1598
+ {
1599
+ "参数": "subTitle",
1600
+ "说明": "二级标题,可以配置为空",
1601
+ "类型": "`ReactNode`",
1602
+ "默认值": "-"
1603
+ },
1604
+ {
1605
+ "参数": "actions",
1606
+ "说明": "自定义额外的登录功能",
1607
+ "类型": "`ReactNode`"
1608
+ },
1609
+ {
1610
+ "参数": "message",
1611
+ "说明": "form 顶部的一个提示配置,可以配置一些错误的提示信息",
1612
+ "类型": "`ReactNode`",
1613
+ "默认值": "-"
1614
+ }
1615
+ ]
1616
+ },
1617
+ {
1618
+ "title": "ProForm - LoginFormPage",
1619
+ "table": [
1620
+ {
1621
+ "参数": "logo",
1622
+ "说明": "logo 的配置,支持 ReactNode 和 string",
1623
+ "类型": "`ReactNode | url`",
1624
+ "默认值": "-"
1625
+ },
1626
+ {
1627
+ "参数": "title",
1628
+ "说明": "标题,可以配置为空",
1629
+ "类型": "`ReactNode`",
1630
+ "默认值": "-"
1631
+ },
1632
+ {
1633
+ "参数": "subTitle",
1634
+ "说明": "二级标题,可以配置为空",
1635
+ "类型": "`ReactNode`",
1636
+ "默认值": "-"
1637
+ },
1638
+ {
1639
+ "参数": "actions",
1640
+ "说明": "自定义额外的登录功能",
1641
+ "类型": "`ReactNode`"
1642
+ },
1643
+ {
1644
+ "参数": "message",
1645
+ "说明": "form 顶部的一个提示配置,可以配置一些错误的提示信息",
1646
+ "类型": "`ReactNode`",
1647
+ "默认值": "-"
1648
+ },
1649
+ {
1650
+ "参数": "backgroundImageUrl",
1651
+ "说明": "整个区域的背景图片配置,手机端不会展示",
1652
+ "类型": "`url`",
1653
+ "默认值": "-"
1654
+ },
1655
+ {
1656
+ "参数": "activityConfig",
1657
+ "说明": "活动的配置,包含 title,subTitle,action,分别代表标题,次标题和行动按钮,也可配置 style 来控制区域的样式",
1658
+ "类型": "`{title,subTitle,action,style}`",
1659
+ "默认值": "-"
1660
+ }
1661
+ ]
1662
+ }
1663
+ ]
1664
+ },
1665
+ {
1666
+ "packageName": "ProForm",
1667
+ "tableData": [
1668
+ {
1669
+ "title": "ProForm - ModalForm",
1670
+ "table": [
1671
+ {
1672
+ "参数": "trigger",
1673
+ "说明": "用于触发 Modal 打开的 dom,一般是 button",
1674
+ "类型": "`ReactNode`",
1675
+ "默认值": "-"
1676
+ },
1677
+ {
1678
+ "参数": "open",
1679
+ "说明": "是否打开",
1680
+ "类型": "`open`",
1681
+ "默认值": "-"
1682
+ },
1683
+ {
1684
+ "参数": "onOpenChange",
1685
+ "说明": "visible 改变时触发",
1686
+ "类型": "`(open:boolean)=>void`",
1687
+ "默认值": "-"
1688
+ },
1689
+ {
1690
+ "参数": "modalProps",
1691
+ "说明": "Modal 的 props,使用方式与 [antd](https://ant.design/components/modal-cn/) 相同。注意:不支持 'visible',请使用全局的 visible",
1692
+ "类型": "-"
1693
+ },
1694
+ {
1695
+ "参数": "title",
1696
+ "说明": "弹框的标题",
1697
+ "类型": "`ReactNode`",
1698
+ "默认值": "-"
1699
+ },
1700
+ {
1701
+ "参数": "width",
1702
+ "说明": "弹框的宽度",
1703
+ "类型": "`Number`",
1704
+ "默认值": "-"
1705
+ },
1706
+ {
1707
+ "参数": "onFinish",
1708
+ "说明": "提交数据时触发,如果返回一个 true。会关掉抽屉,如果配置了 `destroyOnClose` 还会重置表单。",
1709
+ "类型": "`async (values)=>boolean`",
1710
+ "默认值": "-"
1711
+ },
1712
+ {
1713
+ "参数": "submitTimeout",
1714
+ "说明": "提交数据时,禁用取消按钮的超时时间(毫秒)。",
1715
+ "类型": "`Number`",
1716
+ "默认值": "-"
1717
+ },
1718
+ {
1719
+ "参数": "submitter",
1720
+ "说明": "提交按钮相关配置,使用方式与 [ProForm](https://procomponents.ant.design/components/form) 相同。",
1721
+ "类型": "-"
1722
+ }
1723
+ ]
1724
+ },
1725
+ {
1726
+ "title": "ProForm - DrawerForm",
1727
+ "table": [
1728
+ {
1729
+ "参数": "trigger",
1730
+ "说明": "用于触发 Modal 打开的 dom,一般是 button",
1731
+ "类型": "`ReactNode`",
1732
+ "默认值": "-"
1733
+ },
1734
+ {
1735
+ "参数": "resize",
1736
+ "说明": "是否调整大小",
1737
+ "类型": "`{onResize,maxWidth,minWidth}` | `Boolean`",
1738
+ "默认值": "{ onResize: () => { }, maxWidth: window.innerWidth * 0.8, minWidth: 300}"
1739
+ },
1740
+ {
1741
+ "参数": "onOpenChange",
1742
+ "说明": "open 改变时触发",
1743
+ "类型": "`(open:boolean)=>void`",
1744
+ "默认值": "-"
1745
+ },
1746
+ {
1747
+ "参数": "drawerProps",
1748
+ "说明": "Drawer 的 props,使用方式与 [antd](https://ant.design/components/drawer-cn/) 相同。注意:不支持 'visible',请使用全局的 visible",
1749
+ "类型": "-"
1750
+ },
1751
+ {
1752
+ "参数": "title",
1753
+ "说明": "抽屉的标题",
1754
+ "类型": "`ReactNode`",
1755
+ "默认值": "-"
1756
+ },
1757
+ {
1758
+ "参数": "width",
1759
+ "说明": "抽屉的宽度(受控属性,使用时权重高于 resize)",
1760
+ "类型": "`Number`",
1761
+ "默认值": "-"
1762
+ },
1763
+ {
1764
+ "参数": "onFinish",
1765
+ "说明": "提交数据时触发,如果返回一个 true。会关掉抽屉,如果配置了 `destroyOnClose` 还会重置表单。",
1766
+ "类型": "`async (values)=>boolean`",
1767
+ "默认值": "-"
1768
+ },
1769
+ {
1770
+ "参数": "submitTimeout",
1771
+ "说明": "提交数据时,禁用取消按钮的超时时间(毫秒)。",
1772
+ "类型": "`Number`",
1773
+ "默认值": "-"
1774
+ }
1775
+ ]
1776
+ }
1777
+ ]
1778
+ },
1779
+ {
1780
+ "packageName": "ProForm",
1781
+ "tableData": [
1782
+ {
1783
+ "title": "ProForm - QueryFilter",
1784
+ "table": [
1785
+ {
1786
+ "参数": "collapsed",
1787
+ "说明": "是否折叠超出的表单项,用于受控模式",
1788
+ "类型": "`boolean`",
1789
+ "默认值": "-"
1790
+ },
1791
+ {
1792
+ "参数": "defaultCollapsed",
1793
+ "说明": "默认状态下是否折叠超出的表单项",
1794
+ "类型": "`boolean`",
1795
+ "默认值": "true"
1796
+ },
1797
+ {
1798
+ "参数": "onCollapse",
1799
+ "说明": "切换表单折叠状态时的回调",
1800
+ "类型": "`(collapsed)=>void`",
1801
+ "默认值": "-"
1802
+ },
1803
+ {
1804
+ "参数": "hideRequiredMark",
1805
+ "说明": "隐藏所有表单项的必选标记,**默认隐藏**",
1806
+ "类型": "`boolean`",
1807
+ "默认值": "true"
1808
+ },
1809
+ {
1810
+ "参数": "submitterColSpanProps",
1811
+ "说明": "提交按钮所在 col 的 props",
1812
+ "类型": "ColProps",
1813
+ "默认值": "-"
1814
+ },
1815
+ {
1816
+ "参数": "defaultColsNumber",
1817
+ "说明": "自定义折叠状态下默认显示的表单控件数量,没有设置或小于 0,则显示一行控件;数量大于等于控件数量则隐藏展开按钮",
1818
+ "类型": "`number`",
1819
+ "默认值": "-"
1820
+ },
1821
+ {
1822
+ "参数": "labelWidth",
1823
+ "说明": "label 宽度",
1824
+ "类型": "`number` | `'auto'`",
1825
+ "默认值": "`80`"
1826
+ },
1827
+ {
1828
+ "参数": "span",
1829
+ "说明": "表单项宽度",
1830
+ "类型": "`number[0 - 24]`",
1831
+ "默认值": "-"
1832
+ },
1833
+ {
1834
+ "参数": "split",
1835
+ "说明": "每一行是否有分割线",
1836
+ "类型": "`boolean`",
1837
+ "默认值": "-"
1838
+ },
1839
+ {
1840
+ "参数": "preserve",
1841
+ "说明": "是否能够查询收起的数据,如果设置为 false,收起后的表单数据将会丢失",
1842
+ "类型": "`boolean`",
1843
+ "默认值": "true"
1844
+ }
1845
+ ]
1846
+ },
1847
+ {
1848
+ "title": "ProForm - 默认布局时的规则",
1849
+ "table": [
1850
+ {
1851
+ "容器宽度断点": "`≧ 1352px`",
1852
+ "单行展示表单列数(包含操作区域)": "4 列",
1853
+ "默认布局": "`horizontal`"
1854
+ },
1855
+ {
1856
+ "容器宽度断点": "`≧ 1062px`",
1857
+ "单行展示表单列数(包含操作区域)": "3 列",
1858
+ "默认布局": "`horizontal`"
1859
+ },
1860
+ {
1861
+ "容器宽度断点": "`≧ 701px && < 1063px`",
1862
+ "单行展示表单列数(包含操作区域)": "3 列",
1863
+ "默认布局": "`horizontal`"
1864
+ },
1865
+ {
1866
+ "容器宽度断点": "`≧ 513px && < 701px`",
1867
+ "单行展示表单列数(包含操作区域)": "2 列",
1868
+ "默认布局": "`vertical`"
1869
+ },
1870
+ {
1871
+ "容器宽度断点": "`< 513px`",
1872
+ "单行展示表单列数(包含操作区域)": "1 列",
1873
+ "默认布局": "`vertical`"
1874
+ }
1875
+ ]
1876
+ },
1877
+ {
1878
+ "title": "ProForm - 强制上下布局时的规则",
1879
+ "table": [
1880
+ {
1881
+ "容器宽度断点": "`≧ 1057px`",
1882
+ "单行展示表单列数(包含操作区域)": "4 列"
1883
+ },
1884
+ {
1885
+ "容器宽度断点": "`≧ 785px && < 1057px`",
1886
+ "单行展示表单列数(包含操作区域)": "3 列"
1887
+ },
1888
+ {
1889
+ "容器宽度断点": "`≧ 513px && < 785px`",
1890
+ "单行展示表单列数(包含操作区域)": "2 列"
1891
+ },
1892
+ {
1893
+ "容器宽度断点": "`< 513px`",
1894
+ "单行展示表单列数(包含操作区域)": "1 列"
1895
+ }
1896
+ ]
1897
+ },
1898
+ {
1899
+ "title": "ProForm - LightFilter",
1900
+ "table": [
1901
+ {
1902
+ "参数": "collapse",
1903
+ "说明": "是否默认折叠全部字段",
1904
+ "类型": "`boolean`",
1905
+ "默认值": "`false`"
1906
+ },
1907
+ {
1908
+ "参数": "collapseLabel",
1909
+ "说明": "折叠区域的标签",
1910
+ "类型": "`ReactNode`",
1911
+ "默认值": "`更多筛选 <DownOutlined/>`"
1912
+ },
1913
+ {
1914
+ "参数": "footerRender",
1915
+ "说明": "底部内容,当不需要默认底部按钮时,可以设为 footer={false}",
1916
+ "类型": "`(onClear?: () => void, onConfirm: () => void) => JSX.Element | false)`|`false`",
1917
+ "默认值": "-"
1918
+ },
1919
+ {
1920
+ "参数": "placement",
1921
+ "说明": "选择框弹出的位置 :`bottomLeft` `bottomRight` `topLeft` `topRight`",
1922
+ "类型": "string",
1923
+ "默认值": "bottomLeft"
1924
+ }
1925
+ ]
1926
+ }
1927
+ ]
1928
+ },
1929
+ {
1930
+ "packageName": "ProForm",
1931
+ "tableData": [
1932
+ {
1933
+ "title": "ProForm - API",
1934
+ "table": [
1935
+ {
1936
+ "字段名称": "`layoutType`",
1937
+ "类型": "使用的表单布局模式"
1938
+ },
1939
+ {
1940
+ "字段名称": "`steps`",
1941
+ "类型": "`StepFormProps[]`",
1942
+ "说明": "`layoutType=steps`中的分步表单配置,需要配置 columns 为数组使用"
1943
+ },
1944
+ {
1945
+ "字段名称": "`columns`",
1946
+ "类型": "表单的定义,一般是 json 对象,如果是分步表单,需要使用 json 数组来生成多个表单"
1947
+ },
1948
+ {
1949
+ "字段名称": "`shouldUpdate`",
1950
+ "类型": "`(newValues: Record<string, any>, oldValues: Record<string, any>) => boolean | boolean`",
1951
+ "说明": "细粒化控制是否渲染。<br /> 为`true`时会自动重新渲染表单项。<br /> 为`false`时不会更新表单项但可以使用[dependencies 触发更新](#结合-shouldupdatefalse-和-dependencies-触发更新),<br /> 为`function` 时根据返回值判断是否重新渲染表单项,等同直接赋值 `true` 或 `false` [参考示例](#动态控制是否重渲染)"
1952
+ }
1953
+ ]
1954
+ },
1955
+ {
1956
+ "title": "ProForm - ProFormLayoutType",
1957
+ "table": [
1958
+ {
1959
+ "字段名称": "`Form`"
1960
+ },
1961
+ {
1962
+ "字段名称": "`ModalForm`",
1963
+ "说明": "弹框表单,配置之后支持 [ModalForm](/components/modal-form) 的所有配置"
1964
+ },
1965
+ {
1966
+ "字段名称": "`DrawerForm`",
1967
+ "说明": "抽屉表单,配置之后支持 [DrawerForm](/components/modal-form) 的所有配置"
1968
+ },
1969
+ {
1970
+ "字段名称": "`StepsForm`|`StepForm`",
1971
+ "说明": "配置之后为分步表单,有两种模式一种使用 `steps` 和 `columns` 来生成,一种是通过 `layoutType=StepsForm` 嵌套 `layoutType=StepForm` 来实现"
1972
+ },
1973
+ {
1974
+ "字段名称": "`LightFilter`",
1975
+ "说明": "轻量筛选,配置之后支持 [`LightFilter`](/components/query-filter) 的所有配置"
1976
+ },
1977
+ {
1978
+ "字段名称": "`QueryFilter`",
1979
+ "说明": "查询表单,配置之后支持 [`QueryFilter`](/components/query-filter) 的所有配置"
1980
+ },
1981
+ {
1982
+ "字段名称": "`Embed`",
1983
+ "说明": "内嵌模式,只生成表单项,不生成 Form 可以混合使用"
1984
+ }
1985
+ ]
1986
+ },
1987
+ {
1988
+ "title": "ProForm - Schema 定义",
1989
+ "table": [
1990
+ {
1991
+ "字段名称": "`key`",
1992
+ "类型": "`React.key`",
1993
+ "说明": "确定这个列的唯一值,一般用于 dataIndex 重复的情况"
1994
+ },
1995
+ {
1996
+ "字段名称": "`dataIndex`",
1997
+ "类型": "`React.key` | `React.key[]`",
1998
+ "说明": "与实体映射的 key,数组会被转化 `[a,b] => Entity.a.b`"
1999
+ },
2000
+ {
2001
+ "字段名称": "`valueType`",
2002
+ "类型": "`ProFieldValueType`",
2003
+ "说明": "数据的渲渲染方式,我们自带了一部分,你也可以自定义 valueType"
2004
+ },
2005
+ {
2006
+ "字段名称": "`title`",
2007
+ "类型": "`ReactNode` |`(props,type,dom)=> ReactNode`",
2008
+ "说明": "标题的内容,在 form 中是 label"
2009
+ },
2010
+ {
2011
+ "字段名称": "`tooltip`",
2012
+ "类型": "`string`",
2013
+ "说明": "会在 title 旁边展示一个 icon,鼠标浮动之后展示"
2014
+ },
2015
+ {
2016
+ "字段名称": "`valueEnum`",
2017
+ "类型": "`(Entity)=> ValueEnum` | `ValueEnum`",
2018
+ "说明": "支持 object 和 Map,Map 是支持其他基础类型作为 key"
2019
+ },
2020
+ {
2021
+ "字段名称": "`fieldProps`",
2022
+ "类型": "`(form,config)=>fieldProps`| `fieldProps`",
2023
+ "说明": "传给渲染的组件的 props,自定义的时候也会传递"
2024
+ },
2025
+ {
2026
+ "字段名称": "`formItemProps`",
2027
+ "类型": "`(form,config)=>formItemProps` | `formItemProps`",
2028
+ "说明": "传递给 Form.Item 的配置"
2029
+ },
2030
+ {
2031
+ "字段名称": "`formItemProps.rules`",
2032
+ "类型": "`Rule[]`",
2033
+ "说明": "表单项的校验规则。需要注意的是,如果当前表单项为`formList`时,此规则仅校验列表是否为空,且仅接受元组`[{required: boolean, message: string}]`,用于开启和关闭非空校验及指定空列表提示消息"
2034
+ },
2035
+ {
2036
+ "字段名称": "`proFieldProps`",
2037
+ "类型": "`proFieldProps`",
2038
+ "说明": "设置到 `ProField` 上面的 `props`,内部属性"
2039
+ },
2040
+ {
2041
+ "字段名称": "`renderText`",
2042
+ "类型": "`(text: any, record: Entity, index: number, action: ProCoreActionType) => any`",
2043
+ "说明": "修改的数据是会被 valueType 定义的渲染组件消费"
2044
+ },
2045
+ {
2046
+ "字段名称": "`render`",
2047
+ "类型": "`(dom,entity,index, action, schema) => React.ReactNode`",
2048
+ "说明": "自定义只读模式的 dom,`render` 方法只管理的只读模式,编辑模式需要使用 `renderFormItem`"
2049
+ },
2050
+ {
2051
+ "字段名称": "`renderFormItem`",
2052
+ "类型": "`(schema,config,form) => React.ReactNode`",
2053
+ "说明": "自定义编辑模式,返回一个 ReactNode,会自动包裹 value 和 onChange。 请使用 dependency 组件控制是否渲染列"
2054
+ },
2055
+ {
2056
+ "字段名称": "`request`",
2057
+ "类型": "`(params,props) => Promise<{label,value}[]>`",
2058
+ "说明": "从远程请求网络数据,一般用于选择类组件"
2059
+ },
2060
+ {
2061
+ "字段名称": "`params`",
2062
+ "类型": "`Record<string, any>`",
2063
+ "说明": "额外传递给 `request` 的参数,组件不做处理,但是变化会引起`request` 重新请求数据"
2064
+ },
2065
+ {
2066
+ "字段名称": "`dependencies`",
2067
+ "类型": "`string | number | (string | number)[]`",
2068
+ "说明": "所依赖的 values 变化后,触发 renderFormItem,fieldProps,formItemProps 重新执行,并把 values 注入到 params 里 [示例](#使用-dependencies-触发-fieldpropsformitempropsrenderformitem-更新)"
2069
+ },
2070
+ {
2071
+ "字段名称": "`hideInDescriptions`",
2072
+ "类型": "`boolean`",
2073
+ "说明": "在 descriptions 中隐藏"
2074
+ },
2075
+ {
2076
+ "字段名称": "`hideInForm`",
2077
+ "类型": "`boolean`",
2078
+ "说明": "在 Form 中隐藏"
2079
+ },
2080
+ {
2081
+ "字段名称": "`hideInTable`",
2082
+ "类型": "`boolean`",
2083
+ "说明": "在 Table 中隐藏"
2084
+ },
2085
+ {
2086
+ "字段名称": "`hideInSearch`",
2087
+ "类型": "`boolean`",
2088
+ "说明": "在 Table 的查询表格中隐藏"
2089
+ },
2090
+ {
2091
+ "字段名称": "`columns`",
2092
+ "类型": "`ProFormColumnsType[] | (values) => ProFormColumnsType[]`",
2093
+ "说明": "嵌套子项,valueType 为 dependency 时,请使用`(values) => ProFormColumnsType[]`其他情况使用 `ProFormColumnsType[]`"
2094
+ },
2095
+ {
2096
+ "字段名称": "`colProps`",
2097
+ "类型": "在开启 grid 模式时传递给 Col"
2098
+ },
2099
+ {
2100
+ "字段名称": "`rowProps`",
2101
+ "类型": "开启栅格化模式时传递给 Row"
2102
+ }
2103
+ ]
2104
+ }
2105
+ ]
2106
+ },
2107
+ {
2108
+ "packageName": "ProForm",
2109
+ "tableData": [
2110
+ {
2111
+ "title": "ProForm - API",
2112
+ "table": [
2113
+ {
2114
+ "参数": "current",
2115
+ "说明": "当前表单的步骤数,从 `0` 开始",
2116
+ "类型": "`number`",
2117
+ "默认值": "0"
2118
+ },
2119
+ {
2120
+ "参数": "onCurrentChange",
2121
+ "说明": "current 发生改变的事件",
2122
+ "类型": "`(current:number)=>void`",
2123
+ "默认值": "-"
2124
+ },
2125
+ {
2126
+ "参数": "onFinish",
2127
+ "说明": "表单最后一步提交成功触发,如果返回`true`就会自动重置表单(包括`StepForm`变回第一步)",
2128
+ "类型": "`(values:T)=>void | boolean`",
2129
+ "默认值": "-"
2130
+ },
2131
+ {
2132
+ "参数": "stepsProps",
2133
+ "说明": "StepsForm 自带的 Steps 的 props,使用方式与 [antd](https://ant.design/components/steps-cn/) 相同,但是去掉了 current 和 onChange",
2134
+ "类型": "-"
2135
+ },
2136
+ {
2137
+ "参数": "stepFormRender",
2138
+ "说明": "自定义当前展示的表单,返回 dom 在表单内部",
2139
+ "类型": "`(form) => ReactNode`",
2140
+ "默认值": "-"
2141
+ },
2142
+ {
2143
+ "参数": "stepsFormRender",
2144
+ "说明": "自定义整个表单区域,返回的 dom 在表单的外部",
2145
+ "类型": "`(form,submitter) => ReactNode`",
2146
+ "默认值": "-"
2147
+ },
2148
+ {
2149
+ "参数": "stepsRender",
2150
+ "说明": "自定义步骤器",
2151
+ "类型": "`(steps,dom)=>ReactNode`",
2152
+ "默认值": "-"
2153
+ },
2154
+ {
2155
+ "参数": "formRef",
2156
+ "说明": "StepForm action 的引用,便于自定义触发",
2157
+ "类型": "`MutableRefObject<FormInstance>`",
2158
+ "默认值": "-"
2159
+ }
2160
+ ]
2161
+ },
2162
+ {
2163
+ "title": "ProForm - StepForm",
2164
+ "table": [
2165
+ {
2166
+ "参数": "onFinish",
2167
+ "说明": "表单提交成功触发",
2168
+ "类型": "`(values:T)=>Promise<false>`",
2169
+ "默认值": "-"
2170
+ }
2171
+ ]
2172
+ }
2173
+ ]
2174
+ },
2175
+ {
2176
+ "packageName": "ProLayout",
2177
+ "tableData": []
2178
+ },
2179
+ {
2180
+ "packageName": "ProLayout",
2181
+ "tableData": []
2182
+ },
2183
+ {
2184
+ "packageName": "ProLayout",
2185
+ "tableData": [
2186
+ {
2187
+ "title": "ProLayout - ProLayout",
2188
+ "table": [
2189
+ {
2190
+ "参数": "title",
2191
+ "说明": "layout 的左上角的 title",
2192
+ "类型": "`ReactNode`",
2193
+ "默认值": "`'Ant Design Pro'`"
2194
+ },
2195
+ {
2196
+ "参数": "logo",
2197
+ "说明": "layout 的左上角 logo 的 url",
2198
+ "类型": "`ReactNode` | `()=> ReactNode`",
2199
+ "默认值": "-"
2200
+ },
2201
+ {
2202
+ "参数": "pure",
2203
+ "说明": "是否删除掉所有的自带界面",
2204
+ "类型": "`boolean`",
2205
+ "默认值": "-"
2206
+ },
2207
+ {
2208
+ "参数": "loading",
2209
+ "说明": "layout 的加载态",
2210
+ "类型": "`boolean`",
2211
+ "默认值": "-"
2212
+ },
2213
+ {
2214
+ "参数": "location",
2215
+ "说明": "当前应用会话的位置信息。如果你的应用创建了自定义的 history,则需要显示指定 location 属性,详见 [issue](https://github.com/ant-design/pro-components/issues/327)",
2216
+ "类型": "isBrowser ? window.location : undefined"
2217
+ },
2218
+ {
2219
+ "参数": "appList",
2220
+ "说明": "跨站点导航列表",
2221
+ "类型": "`{ icon, title, desc, url, target, children }[]`",
2222
+ "默认值": "-"
2223
+ },
2224
+ {
2225
+ "参数": "appListRender",
2226
+ "说明": "自定义跨站点导航列表的 render 方法",
2227
+ "类型": "`(props: AppListProps, defaultDom: React.ReactNode) => ReactNode`",
2228
+ "默认值": "-"
2229
+ },
2230
+ {
2231
+ "参数": "menuHeaderRender",
2232
+ "说明": "渲染 logo 和 title, 优先级比 `headerTitleRender` 更高",
2233
+ "类型": "`ReactNode` | `(logo,title)=>ReactNode`",
2234
+ "默认值": "-"
2235
+ },
2236
+ {
2237
+ "参数": "menuFooterRender",
2238
+ "说明": "在 layout 底部渲染一个块",
2239
+ "类型": "`(menuProps)=>ReactNode`",
2240
+ "默认值": "-"
2241
+ },
2242
+ {
2243
+ "参数": "onMenuHeaderClick",
2244
+ "说明": "menu 菜单的头部点击事件",
2245
+ "类型": "`(e: React.MouseEvent<HTMLDivElement>) => void`",
2246
+ "默认值": "-"
2247
+ },
2248
+ {
2249
+ "参数": "menuExtraRender",
2250
+ "说明": "在菜单标题的下面渲染一个区域",
2251
+ "类型": "`(menuProps)=>ReactNode`",
2252
+ "默认值": "-"
2253
+ },
2254
+ {
2255
+ "参数": "onTopMixMenuHeaderClick",
2256
+ "说明": "mix 模式下顶部栏的头部点击事件",
2257
+ "类型": "`(e: React.MouseEvent<HTMLDivElement>) => void`",
2258
+ "默认值": "-"
2259
+ },
2260
+ {
2261
+ "参数": "contentStyle",
2262
+ "说明": "layout 的内容区 style",
2263
+ "类型": "CSSProperties",
2264
+ "默认值": "-"
2265
+ },
2266
+ {
2267
+ "参数": "layout",
2268
+ "说明": "layout 的菜单模式,side:右侧导航,top:顶部导航",
2269
+ "类型": "`side` | `top`|`mix`",
2270
+ "默认值": "`side`"
2271
+ },
2272
+ {
2273
+ "参数": "contentWidth",
2274
+ "说明": "layout 的内容模式,Fluid:自适应,Fixed:定宽 1200px",
2275
+ "类型": "`Fluid` | `Fixed`",
2276
+ "默认值": "`Fluid`"
2277
+ },
2278
+ {
2279
+ "参数": "actionRef",
2280
+ "说明": "layout 的常见操作,比如刷新菜单",
2281
+ "类型": "`MutableRefObject<ActionType>`",
2282
+ "默认值": "-"
2283
+ },
2284
+ {
2285
+ "参数": "fixedHeader",
2286
+ "说明": "是否固定 header 到顶部",
2287
+ "类型": "`boolean`",
2288
+ "默认值": "`false`"
2289
+ },
2290
+ {
2291
+ "参数": "fixSiderbar",
2292
+ "说明": "是否固定导航",
2293
+ "类型": "`boolean`",
2294
+ "默认值": "`false`"
2295
+ },
2296
+ {
2297
+ "参数": "breakpoint",
2298
+ "说明": "触发响应式布局的[断点](https://ant.design/components/grid-cn/#Col)",
2299
+ "类型": "`Enum { 'xs', 'sm', 'md', 'lg', 'xl', 'xxl' }`",
2300
+ "默认值": "`lg`"
2301
+ },
2302
+ {
2303
+ "参数": "menu",
2304
+ "说明": "关于 [menu](#menu) 的配置,暂时只有 locale,locale 可以关闭 menu 的自带的全球化",
2305
+ "类型": "`{ locale: true }`"
2306
+ },
2307
+ {
2308
+ "参数": "iconfontUrl",
2309
+ "说明": "使用 [IconFont](https://ant.design/components/icon-cn/#components-icon-demo-iconfont) 的图标配置",
2310
+ "类型": "`URL`",
2311
+ "默认值": "-"
2312
+ },
2313
+ {
2314
+ "参数": "locale",
2315
+ "说明": "当前 layout 的语言设置",
2316
+ "类型": "`zh-CN` | `zh-TW` | `en-US`",
2317
+ "默认值": "navigator.language"
2318
+ },
2319
+ {
2320
+ "参数": "settings",
2321
+ "说明": "layout 的设置",
2322
+ "类型": "-"
2323
+ },
2324
+ {
2325
+ "参数": "siderWidth",
2326
+ "说明": "侧边菜单宽度",
2327
+ "类型": "`number`",
2328
+ "默认值": "208"
2329
+ },
2330
+ {
2331
+ "参数": "suppressSiderWhenMenuEmpty",
2332
+ "说明": "在菜单为空时隐藏 Sider",
2333
+ "类型": "`boolean`",
2334
+ "默认值": "-"
2335
+ },
2336
+ {
2337
+ "参数": "defaultCollapsed",
2338
+ "说明": "默认的菜单的收起和展开,会受到 `breakpoint` 的影响,`breakpoint=false` 生效",
2339
+ "类型": "`boolean`",
2340
+ "默认值": "-"
2341
+ },
2342
+ {
2343
+ "参数": "collapsed",
2344
+ "说明": "控制菜单的收起和展开",
2345
+ "类型": "`boolean`",
2346
+ "默认值": "-"
2347
+ },
2348
+ {
2349
+ "参数": "onCollapse",
2350
+ "说明": "菜单的折叠收起事件",
2351
+ "类型": "`(collapsed: boolean) => void`",
2352
+ "默认值": "-"
2353
+ },
2354
+ {
2355
+ "参数": "onPageChange",
2356
+ "说明": "页面切换时触发",
2357
+ "类型": "`(location: Location) => void`",
2358
+ "默认值": "-"
2359
+ },
2360
+ {
2361
+ "参数": "headerRender",
2362
+ "说明": "自定义头的 render 方法",
2363
+ "类型": "`(props: ProLayoutProps) => ReactNode`",
2364
+ "默认值": "-"
2365
+ },
2366
+ {
2367
+ "参数": "headerTitleRender",
2368
+ "说明": "自定义头标题的方法,mix 模式和 top 模式下生效",
2369
+ "类型": "`(logo,title,props)=>ReactNode`",
2370
+ "默认值": "-"
2371
+ },
2372
+ {
2373
+ "参数": "headerContentRender",
2374
+ "说明": "自定义头内容的方法",
2375
+ "类型": "`(props: ProLayoutProps) => ReactNode`",
2376
+ "默认值": "-"
2377
+ },
2378
+ {
2379
+ "参数": "avatarProps",
2380
+ "说明": "layout 的头像设置,不同的 layout 放在不同的位置",
2381
+ "类型": "-"
2382
+ },
2383
+ {
2384
+ "参数": "actionsRender",
2385
+ "说明": "自定义操作列表",
2386
+ "类型": "`(layoutProps)=>ReactNode[]`",
2387
+ "默认值": "-"
2388
+ },
2389
+ {
2390
+ "参数": "collapsedButtonRender",
2391
+ "说明": "自定义 collapsed button 的方法",
2392
+ "类型": "`(collapsed: boolean) => ReactNode`",
2393
+ "默认值": "-"
2394
+ },
2395
+ {
2396
+ "参数": "footerRender",
2397
+ "说明": "自定义页脚的 render 方法",
2398
+ "类型": "`(props: ProLayoutProps) => JSX.Element | false`",
2399
+ "默认值": "-"
2400
+ },
2401
+ {
2402
+ "参数": "pageTitleRender",
2403
+ "说明": "自定义页面标题的显示方法",
2404
+ "类型": "`(props: ProLayoutProps) => string`",
2405
+ "默认值": "-"
2406
+ },
2407
+ {
2408
+ "参数": "menuRender",
2409
+ "说明": "自定义菜单的 render 方法",
2410
+ "类型": "`(props: HeaderViewProps) => ReactNode`",
2411
+ "默认值": "-"
2412
+ },
2413
+ {
2414
+ "参数": "postMenuData",
2415
+ "说明": "在显示前对菜单数据进行查看,修改不会触发重新渲染",
2416
+ "类型": "`(menuData: MenuDataItem[]) => MenuDataItem[]`",
2417
+ "默认值": "-"
2418
+ },
2419
+ {
2420
+ "参数": "menuItemRender",
2421
+ "说明": "自定义菜单项的 render 方法",
2422
+ "类型": "-"
2423
+ },
2424
+ {
2425
+ "参数": "subMenuItemRender",
2426
+ "说明": "自定义拥有子菜单菜单项的 render 方法",
2427
+ "类型": "-"
2428
+ },
2429
+ {
2430
+ "参数": "menuDataRender",
2431
+ "说明": "menuData 的 render 方法,用来自定义 menuData",
2432
+ "类型": "`(menuData: MenuDataItem[]) => MenuDataItem[]`",
2433
+ "默认值": "-"
2434
+ },
2435
+ {
2436
+ "参数": "breadcrumbRender",
2437
+ "说明": "自定义面包屑的数据",
2438
+ "类型": "`(route)=>route`",
2439
+ "默认值": "-"
2440
+ },
2441
+ {
2442
+ "参数": "breadcrumbProps",
2443
+ "说明": "传递到 antd Breadcrumb 组件的 props, 参考 [面包屑](https://ant.design/components/breadcrumb-cn/)",
2444
+ "类型": "`breadcrumbProps`",
2445
+ "默认值": "undefined"
2446
+ },
2447
+ {
2448
+ "参数": "route",
2449
+ "说明": "用于生成菜单和面包屑。Umi 的 Layout 会自动带有",
2450
+ "类型": "-"
2451
+ },
2452
+ {
2453
+ "参数": "disableMobile",
2454
+ "说明": "禁止自动切换到移动页面",
2455
+ "类型": "`boolean`",
2456
+ "默认值": "false"
2457
+ },
2458
+ {
2459
+ "参数": "ErrorBoundary",
2460
+ "说明": "自带了错误处理功能,防止白屏,`ErrorBoundary=false` 关闭默认错误边界",
2461
+ "类型": "`ReactNode`",
2462
+ "默认值": "内置 ErrorBoundary"
2463
+ },
2464
+ {
2465
+ "参数": "links",
2466
+ "说明": "显示在菜单右下角的快捷操作",
2467
+ "类型": "`ReactNode[]`",
2468
+ "默认值": "-"
2469
+ },
2470
+ {
2471
+ "参数": "menuProps",
2472
+ "说明": "传递到 antd menu 组件的 props, 参考 [导航菜单](https://ant.design/components/menu-cn/)",
2473
+ "类型": "`MenuProps`",
2474
+ "默认值": "undefined"
2475
+ },
2476
+ {
2477
+ "参数": "waterMarkProps",
2478
+ "说明": "配置水印,水印是 PageContainer 的功能,layout 只是透传给 PageContainer",
2479
+ "类型": "-"
2480
+ }
2481
+ ]
2482
+ },
2483
+ {
2484
+ "title": "ProLayout - menu",
2485
+ "table": [
2486
+ {
2487
+ "参数": "locale",
2488
+ "说明": "menu 是否使用国际化,还需要 formatMessage 的配合。",
2489
+ "类型": "`boolean`",
2490
+ "默认值": "`true`"
2491
+ },
2492
+ {
2493
+ "参数": "defaultOpenAll",
2494
+ "说明": "默认打开所有的菜单项,要注意只有 layout 挂载之前生效,异步加载菜单是不支持的",
2495
+ "类型": "`boolean`",
2496
+ "默认值": "`false`"
2497
+ },
2498
+ {
2499
+ "参数": "ignoreFlatMenu",
2500
+ "说明": "是否忽略手动折叠过的菜单状态,结合 defaultOpenAll 可实现折叠按钮切换后,同样可以展开所有子菜单",
2501
+ "类型": "`boolean`",
2502
+ "默认值": "`false`"
2503
+ },
2504
+ {
2505
+ "参数": "type",
2506
+ "说明": "菜单的类型",
2507
+ "类型": "`sub` | `group`",
2508
+ "默认值": "`group`"
2509
+ },
2510
+ {
2511
+ "参数": "autoClose",
2512
+ "说明": "选中菜单是否自动关闭菜单",
2513
+ "类型": "`boolean`",
2514
+ "默认值": "`true`"
2515
+ },
2516
+ {
2517
+ "参数": "loading",
2518
+ "说明": "菜单是否正在加载中",
2519
+ "类型": "`boolean`",
2520
+ "默认值": "`false`"
2521
+ },
2522
+ {
2523
+ "参数": "onLoadingChange",
2524
+ "说明": "菜单的加载状态变更",
2525
+ "类型": "`(loading)=>void`",
2526
+ "默认值": "-"
2527
+ },
2528
+ {
2529
+ "参数": "request",
2530
+ "说明": "远程加载菜单的方法,会自动修改 loading 状态",
2531
+ "类型": "`(params,defaultMenuDat) => Promise<MenuDataItem[]>`",
2532
+ "默认值": "-"
2533
+ }
2534
+ ]
2535
+ },
2536
+ {
2537
+ "title": "ProLayout - SettingDrawer",
2538
+ "table": [
2539
+ {
2540
+ "参数": "collapse",
2541
+ "说明": "控制 SettingDrawer 的收起和展开",
2542
+ "类型": "`boolean`",
2543
+ "默认值": "-"
2544
+ },
2545
+ {
2546
+ "参数": "onCollapseChange",
2547
+ "说明": "SettingDrawer 的折叠收起事件",
2548
+ "类型": "`(collapsed: boolean) => void`",
2549
+ "默认值": "-"
2550
+ },
2551
+ {
2552
+ "参数": "settings",
2553
+ "说明": "layout 的设置",
2554
+ "类型": "-"
2555
+ },
2556
+ {
2557
+ "参数": "onSettingChange",
2558
+ "说明": "`(settings: [`Settings`](#Settings) ) => void`",
2559
+ "类型": "-"
2560
+ },
2561
+ {
2562
+ "参数": "hideHintAlert",
2563
+ "说明": "删除下方的提示信息",
2564
+ "类型": "`boolean`",
2565
+ "默认值": "-"
2566
+ },
2567
+ {
2568
+ "参数": "hideCopyButton",
2569
+ "说明": "不展示 copy 功能",
2570
+ "类型": "`boolean`",
2571
+ "默认值": "-"
2572
+ },
2573
+ {
2574
+ "参数": "disableUrlParams",
2575
+ "说明": "禁止同步设置到查询参数",
2576
+ "类型": "`boolean`",
2577
+ "默认值": "`false`"
2578
+ },
2579
+ {
2580
+ "参数": "enableDarkTheme",
2581
+ "说明": "打开黑色主题切换功能 | `boolean`",
2582
+ "类型": "`false`"
2583
+ },
2584
+ {
2585
+ "参数": "colorList",
2586
+ "说明": "自带的颜色切换系统 (ColorList 的 title 会作为 Tooltip 显示) | `{key,color,title?}[]`",
2587
+ "类型": "`ColorList`"
2588
+ }
2589
+ ]
2590
+ },
2591
+ {
2592
+ "title": "ProLayout - PageLoading",
2593
+ "table": [
2594
+ {
2595
+ "参数": "支持所有的 antd `Spin` 组件参数",
2596
+ "说明": "-",
2597
+ "类型": "-"
2598
+ }
2599
+ ]
2600
+ },
2601
+ {
2602
+ "title": "ProLayout - getMenuData",
2603
+ "table": [
2604
+ {
2605
+ "参数": "routes",
2606
+ "说明": "路由的配置信息",
2607
+ "类型": "-"
2608
+ },
2609
+ {
2610
+ "参数": "menu",
2611
+ "说明": "menu 的配置项,默认 `{locale: true}`",
2612
+ "类型": "`{ locale: boolean }`",
2613
+ "默认值": "-"
2614
+ },
2615
+ {
2616
+ "参数": "menuDataRender",
2617
+ "说明": "menuData 的 render 方法,用来自定义 menuData",
2618
+ "类型": "`(menuData: MenuDataItem[]) => MenuDataItem[]`",
2619
+ "默认值": "-"
2620
+ },
2621
+ {
2622
+ "参数": "formatMessage",
2623
+ "说明": "react-intl 的 formatMessage 方法",
2624
+ "类型": "`(data: { id: any; defaultMessage?: string }) => string;`",
2625
+ "默认值": "-"
2626
+ }
2627
+ ]
2628
+ },
2629
+ {
2630
+ "title": "ProLayout - getPageTitle",
2631
+ "table": [
2632
+ {
2633
+ "参数": "pathname",
2634
+ "说明": "当前的 pathname",
2635
+ "类型": "location.pathname",
2636
+ "默认值": "-"
2637
+ },
2638
+ {
2639
+ "参数": "breadcrumb",
2640
+ "说明": "MenuDataItem 的合集",
2641
+ "类型": "`{ [path: string]: MenuDataItem }`",
2642
+ "默认值": "-"
2643
+ },
2644
+ {
2645
+ "参数": "menu",
2646
+ "说明": "menu 的配置项,默认 `{locale: true}`",
2647
+ "类型": "`{ locale: boolean }`",
2648
+ "默认值": "-"
2649
+ },
2650
+ {
2651
+ "参数": "title",
2652
+ "说明": "title 的类型",
2653
+ "类型": "string",
2654
+ "默认值": "'Ant Design Pro'"
2655
+ },
2656
+ {
2657
+ "参数": "formatMessage",
2658
+ "说明": "react-intl 的 formatMessage 方法",
2659
+ "类型": "`(data: { id: any; defaultMessage?: string }) => string;`",
2660
+ "默认值": "-"
2661
+ }
2662
+ ]
2663
+ },
2664
+ {
2665
+ "title": "ProLayout - GridContent",
2666
+ "table": [
2667
+ {
2668
+ "参数": "contentWidth",
2669
+ "说明": "内容模式",
2670
+ "类型": "`Fluid` | `Fixed`",
2671
+ "默认值": "-"
2672
+ }
2673
+ ]
2674
+ },
2675
+ {
2676
+ "title": "ProLayout - Layout 的 token",
2677
+ "table": [
2678
+ {
2679
+ "token": "bgLayout",
2680
+ "说明": "layout 的背景颜色",
2681
+ "默认值": "`linear-gradient(${antdToken.colorBgContainer}, ${antdToken.colorBgLayout} 28%)`"
2682
+ },
2683
+ {
2684
+ "token": "colorTextAppListIcon",
2685
+ "说明": "跨站点应用的图标颜色",
2686
+ "默认值": "`#666`"
2687
+ },
2688
+ {
2689
+ "token": "colorTextAppListIconHover",
2690
+ "说明": "跨站点应用的图标 hover 颜色",
2691
+ "默认值": "`rgba(0, 0, 0, 0.65)`"
2692
+ },
2693
+ {
2694
+ "token": "colorBgAppListIconHover",
2695
+ "说明": "跨站点应用的图标 hover 背景颜色",
2696
+ "默认值": "`rgba(0, 0, 0, 0.04)`"
2697
+ }
2698
+ ]
2699
+ },
2700
+ {
2701
+ "title": "ProLayout - Sider Token",
2702
+ "table": [
2703
+ {
2704
+ "token": "colorMenuBackground",
2705
+ "说明": "menu 的背景颜色",
2706
+ "默认值": "`transparent`"
2707
+ },
2708
+ {
2709
+ "token": "colorTextMenuTitle",
2710
+ "说明": "sider 的标题字体颜色",
2711
+ "默认值": "`colorTextHeading`"
2712
+ },
2713
+ {
2714
+ "token": "colorMenuItemDivider",
2715
+ "说明": "menuItem 分割线的颜色",
2716
+ "默认值": "`colorSplit`"
2717
+ },
2718
+ {
2719
+ "token": "colorTextMenu",
2720
+ "说明": "menuItem 的字体颜色",
2721
+ "默认值": "`colorText`"
2722
+ },
2723
+ {
2724
+ "token": "colorTextMenuSecondary",
2725
+ "说明": "menu 的二级字体颜色,比如 footer 和 action 的 icon",
2726
+ "默认值": "`colorText`"
2727
+ },
2728
+ {
2729
+ "token": "colorTextMenuSelected",
2730
+ "说明": "menuItem 的选中字体颜色",
2731
+ "默认值": "`rgb(0,0,0)`"
2732
+ },
2733
+ {
2734
+ "token": "colorTextMenuActive",
2735
+ "说明": "menuItem hover 的选中字体颜色",
2736
+ "默认值": "`rgba(0, 0, 0, 0.85)`"
2737
+ },
2738
+ {
2739
+ "token": "colorTextMenuItemHover",
2740
+ "说明": "menuItem 的 hover 字体颜色",
2741
+ "默认值": "`rgba(255,255,255,0.75)`"
2742
+ },
2743
+ {
2744
+ "token": "colorBgMenuItemHover",
2745
+ "说明": "menuItem 的 hover 背景颜色",
2746
+ "默认值": "`rgba(90, 75, 75, 0.03)`"
2747
+ },
2748
+ {
2749
+ "token": "colorBgMenuItemSelected",
2750
+ "说明": "menuItem 的选中背景颜色",
2751
+ "默认值": "`rgba(0, 0, 0, 0.04)`"
2752
+ },
2753
+ {
2754
+ "token": "colorBgMenuItemCollapsedElevated",
2755
+ "说明": "收起 menuItem 的弹出菜单背景颜色",
2756
+ "默认值": "`transparent`"
2757
+ },
2758
+ {
2759
+ "token": "colorBgCollapsedButton",
2760
+ "说明": "展开收起按钮背景颜色",
2761
+ "默认值": "`#fff`"
2762
+ },
2763
+ {
2764
+ "token": "colorTextCollapsedButton",
2765
+ "说明": "展开收起按钮字体颜色",
2766
+ "默认值": "`colorTextMenuSecondary`"
2767
+ },
2768
+ {
2769
+ "token": "colorTextCollapsedButtonHover",
2770
+ "说明": "展开收起按钮 hover 时字体颜色",
2771
+ "默认值": "`colorTextMenu`"
2772
+ }
2773
+ ]
2774
+ },
2775
+ {
2776
+ "title": "ProLayout - Header Token",
2777
+ "table": [
2778
+ {
2779
+ "token": "colorBgHeader",
2780
+ "说明": "header 的背景颜色",
2781
+ "默认值": "`rgba(240, 242, 245, 0.4)`"
2782
+ },
2783
+ {
2784
+ "token": "colorHeaderTitle",
2785
+ "说明": "sider 的标题字体颜色",
2786
+ "默认值": "`colorTextHeading`"
2787
+ },
2788
+ {
2789
+ "token": "colorTextMenu",
2790
+ "说明": "menuItem 的字体颜色",
2791
+ "默认值": "`colorText`"
2792
+ },
2793
+ {
2794
+ "token": "colorTextMenuSecondary",
2795
+ "说明": "menu 的二级字体颜色,比如 footer 和 action 的 icon",
2796
+ "默认值": "`colorText`"
2797
+ },
2798
+ {
2799
+ "token": "colorTextMenuSelected",
2800
+ "说明": "menuItem 的选中字体颜色",
2801
+ "默认值": "`rgb(0,0,0)`"
2802
+ },
2803
+ {
2804
+ "token": "colorTextMenuActive",
2805
+ "说明": "menuItem hover 的选中字体颜色",
2806
+ "默认值": "`rgba(0, 0, 0, 0.85)`"
2807
+ },
2808
+ {
2809
+ "token": "colorBgMenuItemHover",
2810
+ "说明": "menuItem 的 hover 背景颜色",
2811
+ "默认值": "`rgba(90, 75, 75, 0.03)`"
2812
+ },
2813
+ {
2814
+ "token": "colorBgMenuItemSelected",
2815
+ "说明": "menuItem 的选中背景颜色",
2816
+ "默认值": "`rgba(0, 0, 0, 0.04)`"
2817
+ },
2818
+ {
2819
+ "token": "colorTextRightActionsItem",
2820
+ "说明": "右上角字体颜色",
2821
+ "默认值": "`colorTextSecondary`"
2822
+ },
2823
+ {
2824
+ "token": "colorBgRightActionsItemHover",
2825
+ "说明": "右上角选中的 hover 颜色",
2826
+ "默认值": "`rgba(0, 0, 0, 0.03)`"
2827
+ },
2828
+ {
2829
+ "token": "heightLayoutHeader",
2830
+ "说明": "header 高度",
2831
+ "默认值": "56"
2832
+ }
2833
+ ]
2834
+ },
2835
+ {
2836
+ "title": "ProLayout - pageContainer Token",
2837
+ "table": [
2838
+ {
2839
+ "token": "paddingBlockPageContainerContent",
2840
+ "说明": "pageContainer 自带的 padding block",
2841
+ "默认值": "`24`"
2842
+ },
2843
+ {
2844
+ "token": "paddingInlinePageContainerContent",
2845
+ "说明": "pageContainer 自带的 padding inline",
2846
+ "默认值": "`40`"
2847
+ },
2848
+ {
2849
+ "token": "colorBgPageContainer",
2850
+ "说明": "pageContainer 的背景颜色",
2851
+ "默认值": "`transparent`"
2852
+ },
2853
+ {
2854
+ "token": "colorBgPageContainerFixed",
2855
+ "说明": "pageContainer 被固定时的背景颜色",
2856
+ "默认值": "`#FFF`"
2857
+ }
2858
+ ]
2859
+ }
2860
+ ]
2861
+ },
2862
+ {
2863
+ "packageName": "ProLayout",
2864
+ "tableData": [
2865
+ {
2866
+ "title": "ProLayout - API",
2867
+ "table": [
2868
+ {
2869
+ "参数": "content",
2870
+ "说明": "内容区",
2871
+ "类型": "ReactNode",
2872
+ "默认值": "-"
2873
+ },
2874
+ {
2875
+ "参数": "extraContent",
2876
+ "说明": "额外内容区,位于 content 的右侧",
2877
+ "类型": "ReactNode",
2878
+ "默认值": "-"
2879
+ },
2880
+ {
2881
+ "参数": "tabList",
2882
+ "说明": "tab 标题列表",
2883
+ "类型": "`{key: string, tab: ReactNode}[]`",
2884
+ "默认值": "-"
2885
+ },
2886
+ {
2887
+ "参数": "tabActiveKey",
2888
+ "说明": "当前高亮的 tab 项",
2889
+ "类型": "string",
2890
+ "默认值": "-"
2891
+ },
2892
+ {
2893
+ "参数": "onTabChange",
2894
+ "说明": "切换面板的回调",
2895
+ "类型": "`(key) => void`",
2896
+ "默认值": "-"
2897
+ },
2898
+ {
2899
+ "参数": "tabBarExtraContent",
2900
+ "说明": "tab bar 上额外的元素",
2901
+ "类型": "`React.ReactNode`",
2902
+ "默认值": "-"
2903
+ },
2904
+ {
2905
+ "参数": "header",
2906
+ "说明": "`PageHeaderProps`",
2907
+ "类型": "-"
2908
+ },
2909
+ {
2910
+ "参数": "ghost",
2911
+ "说明": "配置头部区域的背景颜色为透明",
2912
+ "类型": "boolean",
2913
+ "默认值": "false"
2914
+ },
2915
+ {
2916
+ "参数": "fixedHeader",
2917
+ "说明": "固定 pageHeader 的内容到顶部,如果页面内容较少,最好不要使用,会有严重的遮挡问题",
2918
+ "类型": "`boolean`",
2919
+ "默认值": "-"
2920
+ },
2921
+ {
2922
+ "参数": "affixProps",
2923
+ "说明": "固钉的配置,与 antd 完全相同",
2924
+ "类型": "`AffixProps`",
2925
+ "默认值": "-"
2926
+ },
2927
+ {
2928
+ "参数": "footer",
2929
+ "说明": "悬浮在底部的操作栏,传入一个数组,会自动加空格",
2930
+ "类型": "`ReactNode[]`",
2931
+ "默认值": "-"
2932
+ },
2933
+ {
2934
+ "参数": "waterMarkProps",
2935
+ "说明": "配置水印,Layout 会透传给 PageContainer,但是以 PageContainer 的配置优先",
2936
+ "类型": "-"
2937
+ },
2938
+ {
2939
+ "参数": "tabProps",
2940
+ "说明": "Tabs 的相关属性,只有卡片样式的页签支持新增和关闭选项。使用 `closable={false}` 禁止关闭",
2941
+ "类型": "-"
2942
+ }
2943
+ ]
2944
+ },
2945
+ {
2946
+ "title": "ProLayout - FooterToolbar",
2947
+ "table": [
2948
+ {
2949
+ "参数": "extra",
2950
+ "说明": "额外内容区,位于 content 的右侧",
2951
+ "类型": "`ReactNode`",
2952
+ "默认值": "-"
2953
+ },
2954
+ {
2955
+ "参数": "children",
2956
+ "说明": "内容区域",
2957
+ "类型": "`ReactNode`|`ReactNode[]`",
2958
+ "默认值": "-"
2959
+ }
2960
+ ]
2961
+ }
2962
+ ]
2963
+ },
2964
+ {
2965
+ "packageName": "ProLayout",
2966
+ "tableData": []
2967
+ },
2968
+ {
2969
+ "packageName": "ProLayout",
2970
+ "tableData": []
2971
+ },
2972
+ {
2973
+ "packageName": "ProLayout",
2974
+ "tableData": []
2975
+ },
2976
+ {
2977
+ "packageName": "ProLayout",
2978
+ "tableData": []
2979
+ },
2980
+ {
2981
+ "packageName": "ProLayout",
2982
+ "tableData": []
2983
+ },
2984
+ {
2985
+ "packageName": "ProLayout",
2986
+ "tableData": []
2987
+ },
2988
+ {
2989
+ "packageName": "ProLayout",
2990
+ "tableData": [
2991
+ {
2992
+ "title": "ProLayout - API",
2993
+ "table": [
2994
+ {
2995
+ "参数": "avatar",
2996
+ "说明": "标题栏旁的头像",
2997
+ "类型": "-"
2998
+ },
2999
+ {
3000
+ "参数": "backIcon",
3001
+ "说明": "自定义 back icon ,如果为 false 不渲染 back icon",
3002
+ "类型": "ReactNode | boolean",
3003
+ "默认值": "\\<ArrowLeft />"
3004
+ },
3005
+ {
3006
+ "参数": "breadcrumb",
3007
+ "说明": "面包屑的配置",
3008
+ "类型": "-"
3009
+ },
3010
+ {
3011
+ "参数": "breadcrumbRender",
3012
+ "说明": "自定义面包屑区域的内容",
3013
+ "类型": "`(props, originBreadcrumb) => ReactNode`",
3014
+ "默认值": "-",
3015
+ "版本": "4.11.0"
3016
+ },
3017
+ {
3018
+ "参数": "extra",
3019
+ "说明": "操作区,位于 title 行的行尾",
3020
+ "类型": "ReactNode",
3021
+ "默认值": "-"
3022
+ },
3023
+ {
3024
+ "参数": "footer",
3025
+ "说明": "PageHeader 的页脚,一般用于渲染 TabBar",
3026
+ "类型": "ReactNode",
3027
+ "默认值": "-"
3028
+ },
3029
+ {
3030
+ "参数": "ghost",
3031
+ "说明": "pageHeader 的类型,将会改变背景颜色",
3032
+ "类型": "boolean",
3033
+ "默认值": "true"
3034
+ },
3035
+ {
3036
+ "参数": "subTitle",
3037
+ "说明": "自定义的二级标题文字",
3038
+ "类型": "ReactNode",
3039
+ "默认值": "-"
3040
+ },
3041
+ {
3042
+ "参数": "tags",
3043
+ "说明": "title 旁的 tag 列表",
3044
+ "类型": "-"
3045
+ },
3046
+ {
3047
+ "参数": "title",
3048
+ "说明": "自定义标题文字",
3049
+ "类型": "ReactNode",
3050
+ "默认值": "-"
3051
+ },
3052
+ {
3053
+ "参数": "onBack",
3054
+ "说明": "返回按钮的点击事件",
3055
+ "类型": "() => void",
3056
+ "默认值": "-"
3057
+ }
3058
+ ]
3059
+ }
3060
+ ]
3061
+ },
3062
+ {
3063
+ "packageName": "ProLayout",
3064
+ "tableData": [
3065
+ {
3066
+ "title": "ProLayout - 基础参数",
3067
+ "table": [
3068
+ {
3069
+ "参数": "width",
3070
+ "说明": "水印的宽度",
3071
+ "类型": "number",
3072
+ "默认值": "120",
3073
+ "版本": "2.2.0"
3074
+ },
3075
+ {
3076
+ "参数": "height",
3077
+ "说明": "水印的高度",
3078
+ "类型": "number",
3079
+ "默认值": "64",
3080
+ "版本": "2.2.0"
3081
+ },
3082
+ {
3083
+ "参数": "rotate",
3084
+ "说明": "水印绘制时,旋转的角度,单位 °",
3085
+ "类型": "number",
3086
+ "默认值": "-22",
3087
+ "版本": "2.2.0"
3088
+ },
3089
+ {
3090
+ "参数": "image",
3091
+ "说明": "图片源,建议导出 2 倍或 3 倍图,优先使用图片渲染水印",
3092
+ "类型": "`string`",
3093
+ "默认值": "-",
3094
+ "版本": "2.2.0"
3095
+ },
3096
+ {
3097
+ "参数": "zIndex",
3098
+ "说明": "追加的水印元素的 z-index",
3099
+ "类型": "number",
3100
+ "默认值": "9",
3101
+ "版本": "2.2.0"
3102
+ },
3103
+ {
3104
+ "参数": "content",
3105
+ "说明": "水印文字内容",
3106
+ "类型": "`string` | `string[]`",
3107
+ "默认值": "-",
3108
+ "版本": "2.2.0"
3109
+ },
3110
+ {
3111
+ "参数": "fontColor",
3112
+ "说明": "水印文字颜色",
3113
+ "类型": "`string`",
3114
+ "默认值": "`rgba(0,0,0,.15)`",
3115
+ "版本": "2.2.0"
3116
+ },
3117
+ {
3118
+ "参数": "fontSize",
3119
+ "说明": "文字大小",
3120
+ "类型": "`string` | `number`",
3121
+ "默认值": "16",
3122
+ "版本": "2.2.0"
3123
+ }
3124
+ ]
3125
+ },
3126
+ {
3127
+ "title": "ProLayout - 高级参数",
3128
+ "table": [
3129
+ {
3130
+ "参数": "markStyle",
3131
+ "说明": "水印层的样式",
3132
+ "类型": "React.CSSProperties",
3133
+ "默认值": "-",
3134
+ "版本": "2.3.0"
3135
+ },
3136
+ {
3137
+ "参数": "markClassName",
3138
+ "说明": "水印层的类名",
3139
+ "类型": "string",
3140
+ "默认值": "-",
3141
+ "版本": "2.3.0"
3142
+ },
3143
+ {
3144
+ "参数": "gapX",
3145
+ "说明": "水印之间的水平间距",
3146
+ "类型": "number",
3147
+ "默认值": "212",
3148
+ "版本": "2.4.0"
3149
+ },
3150
+ {
3151
+ "参数": "gapY",
3152
+ "说明": "水印之间的垂直间距",
3153
+ "类型": "number",
3154
+ "默认值": "222",
3155
+ "版本": "2.4.0"
3156
+ },
3157
+ {
3158
+ "参数": "offsetLeft",
3159
+ "说明": "水印在 canvas 画布上绘制的水平偏移量,正常情况下,水印绘制在中间位置,即 `offsetLeft = gapX / 2`",
3160
+ "类型": "number",
3161
+ "默认值": "`offsetLeft = gapX / 2`",
3162
+ "版本": "2.4.0"
3163
+ },
3164
+ {
3165
+ "参数": "offsetTop",
3166
+ "说明": "水印在 canvas 画布上绘制的垂直偏移量,正常情况下,水印绘制在中间位置,即 `offsetTop = gapY / 2`",
3167
+ "类型": "number",
3168
+ "默认值": "`offsetTop = gapY / 2`",
3169
+ "版本": "2.4.0"
3170
+ }
3171
+ ]
3172
+ }
3173
+ ]
3174
+ },
3175
+ {
3176
+ "packageName": "ProList",
3177
+ "tableData": [
3178
+ {
3179
+ "title": "ProList - ProList API",
3180
+ "table": [
3181
+ {
3182
+ "参数": "dataSource",
3183
+ "说明": "与 antd 相同的[配置](https://ant.design/components/list-cn/#API)",
3184
+ "类型": "`any[]`",
3185
+ "默认值": "`false`"
3186
+ },
3187
+ {
3188
+ "参数": "actionRef",
3189
+ "说明": "Table action 的引用,便于自定义触发",
3190
+ "类型": "`MutableRefObject<ActionType>`",
3191
+ "默认值": "-"
3192
+ },
3193
+ {
3194
+ "参数": "metas",
3195
+ "说明": "列表项配置,类似 Table 中的 columns",
3196
+ "类型": "`Metas`",
3197
+ "默认值": "-"
3198
+ },
3199
+ {
3200
+ "参数": "rowKey",
3201
+ "说明": "行的 key,一般是行 id",
3202
+ "类型": "`string` | `(row,index)=>string`",
3203
+ "默认值": "`'id'`"
3204
+ },
3205
+ {
3206
+ "参数": "headerTitle",
3207
+ "说明": "列表头部主标题",
3208
+ "类型": "`React.ReactNode`",
3209
+ "默认值": "-"
3210
+ },
3211
+ {
3212
+ "参数": "loading",
3213
+ "说明": "是否加载中",
3214
+ "类型": "`boolean` | `(item: any) => boolean`",
3215
+ "默认值": "`false`"
3216
+ },
3217
+ {
3218
+ "参数": "split",
3219
+ "说明": "是否有分割线",
3220
+ "类型": "`boolean`",
3221
+ "默认值": "`false`"
3222
+ },
3223
+ {
3224
+ "参数": "rowSelection",
3225
+ "说明": "与 antd 相同的[配置](https://ant.design/components/table-cn/#rowSelection)",
3226
+ "类型": "`object` |`boolean`",
3227
+ "默认值": "false"
3228
+ },
3229
+ {
3230
+ "参数": "expandable",
3231
+ "说明": "与 antd 相同的[配置](https://ant.design/components/table-cn/#expandable)",
3232
+ "类型": "`object` | `false`",
3233
+ "默认值": "-"
3234
+ },
3235
+ {
3236
+ "参数": "showActions",
3237
+ "说明": "何时展示 actions,CardList 模式下不生效",
3238
+ "类型": "`'hover'` | `'always'`",
3239
+ "默认值": "`'always'`"
3240
+ },
3241
+ {
3242
+ "参数": "showExtra",
3243
+ "说明": "何时展示 extra",
3244
+ "类型": "`'hover'` | `'always'`",
3245
+ "默认值": "`'always'`"
3246
+ },
3247
+ {
3248
+ "参数": "onRow",
3249
+ "说明": "与 antd 相同的[配置](https://ant.design/components/table-cn/#onRow-%E7%94%A8%E6%B3%95),用户传入`grid`属性时,列表将会以卡片模式进行渲染,此事件将不会触发,请使用`onItem`",
3250
+ "类型": "`function(record, index)`",
3251
+ "默认值": "-"
3252
+ },
3253
+ {
3254
+ "参数": "onItem",
3255
+ "说明": "与 antd 相同的[配置](https://ant.design/components/table-cn/#onRow-%E7%94%A8%E6%B3%95),在所有类型点击某个项目都会触发该事件。",
3256
+ "类型": "`function(record, index)`",
3257
+ "默认值": "-"
3258
+ },
3259
+ {
3260
+ "参数": "rowClassName",
3261
+ "说明": "自定义列表行的类名",
3262
+ "类型": "`string`| `(row, index) => string`",
3263
+ "默认值": "-"
3264
+ },
3265
+ {
3266
+ "参数": "itemHeaderRender",
3267
+ "说明": "自定义每一列的 header,与 itemRender 不同的时,它会保留多选和展开收起",
3268
+ "类型": "-",
3269
+ "默认值": "-"
3270
+ },
3271
+ {
3272
+ "参数": "itemCardProps",
3273
+ "说明": "自定义卡片列表的 proCard props,只在卡片列表下生效",
3274
+ "类型": "-",
3275
+ "默认值": "-"
3276
+ }
3277
+ ]
3278
+ },
3279
+ {
3280
+ "title": "ProList - Metas.[Meta] 通用 API",
3281
+ "table": [
3282
+ {
3283
+ "参数": "dataIndex",
3284
+ "说明": "数据在数据项中对应的路径,支持通过数组查询嵌套路径",
3285
+ "类型": "`string` | `string[]`",
3286
+ "默认值": "-"
3287
+ },
3288
+ {
3289
+ "参数": "valueType",
3290
+ "说明": "值的类型,和 ProTable 一致",
3291
+ "类型": "`'text'` | `'date'` ...",
3292
+ "默认值": "`'text'`"
3293
+ },
3294
+ {
3295
+ "参数": "render",
3296
+ "说明": "自定义渲染函数",
3297
+ "类型": "`(text: React.ReactNode,record: T,index: number) => React.ReactNode | React.ReactNode[]`",
3298
+ "默认值": "-"
3299
+ }
3300
+ ]
3301
+ },
3302
+ {
3303
+ "title": "ProList - Metas.type",
3304
+ "table": [
3305
+ {
3306
+ "参数": "dataIndex",
3307
+ "说明": "-",
3308
+ "类型": "-",
3309
+ "默认值": "`'type'`"
3310
+ }
3311
+ ]
3312
+ },
3313
+ {
3314
+ "title": "ProList - Metas.title",
3315
+ "table": [
3316
+ {
3317
+ "参数": "dataIndex",
3318
+ "说明": "-",
3319
+ "类型": "-",
3320
+ "默认值": "`'title'`"
3321
+ }
3322
+ ]
3323
+ },
3324
+ {
3325
+ "title": "ProList - Metas.subTitle",
3326
+ "table": [
3327
+ {
3328
+ "参数": "dataIndex",
3329
+ "说明": "-",
3330
+ "类型": "-",
3331
+ "默认值": "`'subTitle'`"
3332
+ }
3333
+ ]
3334
+ },
3335
+ {
3336
+ "title": "ProList - Metas.description",
3337
+ "table": [
3338
+ {
3339
+ "参数": "dataIndex",
3340
+ "说明": "-",
3341
+ "类型": "-",
3342
+ "默认值": "`'description'`"
3343
+ }
3344
+ ]
3345
+ },
3346
+ {
3347
+ "title": "ProList - Metas.avatar",
3348
+ "table": [
3349
+ {
3350
+ "参数": "dataIndex",
3351
+ "说明": "-",
3352
+ "类型": "-",
3353
+ "默认值": "`'avatar'`"
3354
+ }
3355
+ ]
3356
+ },
3357
+ {
3358
+ "title": "ProList - Metas.actions",
3359
+ "table": [
3360
+ {
3361
+ "参数": "dataIndex",
3362
+ "说明": "-",
3363
+ "类型": "-",
3364
+ "默认值": "`'actions'`"
3365
+ },
3366
+ {
3367
+ "参数": "cardActionProps",
3368
+ "说明": "设置卡片列表把 action 渲染到哪里|`extra`|`'actions' | 'extra'`"
3369
+ }
3370
+ ]
3371
+ },
3372
+ {
3373
+ "title": "ProList - Metas.content",
3374
+ "table": [
3375
+ {
3376
+ "参数": "dataIndex",
3377
+ "说明": "-",
3378
+ "类型": "-",
3379
+ "默认值": "`'content'`"
3380
+ }
3381
+ ]
3382
+ },
3383
+ {
3384
+ "title": "ProList - Metas.extra",
3385
+ "table": [
3386
+ {
3387
+ "参数": "dataIndex",
3388
+ "说明": "-",
3389
+ "类型": "-",
3390
+ "默认值": "`'extra'`"
3391
+ }
3392
+ ]
3393
+ }
3394
+ ]
3395
+ },
3396
+ {
3397
+ "packageName": "ProSkeleton",
3398
+ "tableData": [
3399
+ {
3400
+ "title": "ProSkeleton - API",
3401
+ "table": [
3402
+ {
3403
+ "参数": "type",
3404
+ "说明": "不同类型的骨架屏",
3405
+ "类型": "`'list' | 'result' | 'descriptions'`",
3406
+ "默认值": "list"
3407
+ },
3408
+ {
3409
+ "参数": "active",
3410
+ "说明": "是否显示动态",
3411
+ "类型": "boolean",
3412
+ "默认值": "true"
3413
+ },
3414
+ {
3415
+ "参数": "pageHeader",
3416
+ "说明": "是否显示 pageHeader 的骨架屏 descriptions 和 list 有效",
3417
+ "类型": "-",
3418
+ "默认值": "-"
3419
+ },
3420
+ {
3421
+ "参数": "statistic",
3422
+ "说明": "统计信息骨架屏的数量",
3423
+ "类型": "`number` | `false`",
3424
+ "默认值": "-"
3425
+ },
3426
+ {
3427
+ "参数": "list",
3428
+ "说明": "列表的骨架屏,可以控制数量",
3429
+ "类型": "`number` | `false`",
3430
+ "默认值": "-"
3431
+ },
3432
+ {
3433
+ "参数": "toolbar",
3434
+ "说明": "列表的操作栏骨架屏",
3435
+ "类型": "boolean",
3436
+ "默认值": "-"
3437
+ },
3438
+ {
3439
+ "参数": "renderFormItem",
3440
+ "说明": "自定义 `mode=update 或 edit` 下的 dom 表现,一般用于渲染编辑框",
3441
+ "类型": "-",
3442
+ "默认值": "-"
3443
+ },
3444
+ {
3445
+ "参数": "render",
3446
+ "说明": "自定义 `mode=read` 下的 dom 表现,只是单纯的表现形式",
3447
+ "类型": "-",
3448
+ "默认值": "-"
3449
+ }
3450
+ ]
3451
+ }
3452
+ ]
3453
+ },
3454
+ {
3455
+ "packageName": "ProTable",
3456
+ "tableData": [
3457
+ {
3458
+ "title": "ProTable - API",
3459
+ "table": [
3460
+ {
3461
+ "属性": "dragSortKey",
3462
+ "描述": "如配置此参数,则会在该 key 对应的行显示拖拽排序把手,允许拖拽排序",
3463
+ "类型": "`string`",
3464
+ "默认值": "-"
3465
+ },
3466
+ {
3467
+ "属性": "dragSortHandlerRender",
3468
+ "描述": "渲染自定义拖动排序把手的函数 如配置了 dragSortKey 但未配置此参数,则使用默认把手图标",
3469
+ "类型": "`(rowData: T, idx: number) => React.ReactNode`",
3470
+ "默认值": "`<MenuOutlined className=\"dragSortDefaultHandle\" style={{ cursor: 'grab', color: '#999' }} />`"
3471
+ },
3472
+ {
3473
+ "属性": "onDragSortEnd",
3474
+ "描述": "拖动排序完成回调",
3475
+ "类型": "`(beforeIndex: number, afterIndex: number, newDataSource: T[]) => Promise<void> | void`",
3476
+ "默认值": "-"
3477
+ }
3478
+ ]
3479
+ }
3480
+ ]
3481
+ },
3482
+ {
3483
+ "packageName": "ProTable",
3484
+ "tableData": [
3485
+ {
3486
+ "title": "ProTable - API",
3487
+ "table": [
3488
+ {
3489
+ "属性": "`value`",
3490
+ "描述": "同 dataSource,传入一个数组,是 table 渲染的元数据",
3491
+ "类型": "`T[]`",
3492
+ "默认值": "`undefined`"
3493
+ },
3494
+ {
3495
+ "属性": "`onChange`",
3496
+ "描述": "dataSource 修改时触发,删除和修改都会触发,如果设置了 value,Table 会成为一个受控组件。",
3497
+ "类型": "`(value:T[])=>void`",
3498
+ "默认值": "`undefined`"
3499
+ },
3500
+ {
3501
+ "属性": "`recordCreatorProps`",
3502
+ "描述": "新建一行数据的相关配置",
3503
+ "类型": "-"
3504
+ },
3505
+ {
3506
+ "属性": "`maxLength`",
3507
+ "描述": "最大的行数,到达最大行数新建按钮会自动消失",
3508
+ "类型": "number",
3509
+ "默认值": "-"
3510
+ },
3511
+ {
3512
+ "属性": "`editable`",
3513
+ "描述": "可编辑表格的相关配置",
3514
+ "类型": "-"
3515
+ },
3516
+ {
3517
+ "属性": "`controlled`",
3518
+ "描述": "是否受控,如果受控每次编辑都会触发 onChange,并且会修改 dataSource",
3519
+ "类型": "`boolean`",
3520
+ "默认值": "false"
3521
+ },
3522
+ {
3523
+ "属性": "`editableFormRef`",
3524
+ "描述": "table 所有的 form,带了一些表格特有的操作",
3525
+ "类型": "`React.Ref<EditableFormInstance<T>>`",
3526
+ "默认值": "`undefined`"
3527
+ }
3528
+ ]
3529
+ },
3530
+ {
3531
+ "title": "ProTable - editable 编辑行配置",
3532
+ "table": [
3533
+ {
3534
+ "属性": "type",
3535
+ "描述": "可编辑表格的类型,单行编辑或者多行编辑",
3536
+ "类型": "`single` | `multiple`",
3537
+ "默认值": "-"
3538
+ },
3539
+ {
3540
+ "属性": "form",
3541
+ "描述": "可编辑表格的 form 实例,使用 `Form.useForm` 生成后使用",
3542
+ "类型": "`FormInstance`",
3543
+ "默认值": "-"
3544
+ },
3545
+ {
3546
+ "属性": "formProps",
3547
+ "描述": "可以配置 form 的属性,但是不支持 onFinish",
3548
+ "类型": "-"
3549
+ },
3550
+ {
3551
+ "属性": "editableKeys",
3552
+ "描述": "正在编辑的行,受控属性。 默认 `key` 会使用 `rowKey` 的配置,如果没有配置会使用 `index`,建议使用 rowKey",
3553
+ "类型": "`Key[]`",
3554
+ "默认值": "-"
3555
+ },
3556
+ {
3557
+ "属性": "onChange",
3558
+ "描述": "行数据被修改的时候触发",
3559
+ "类型": "`(editableKeys: Key[], editableRows: T[]) => void`",
3560
+ "默认值": "-"
3561
+ },
3562
+ {
3563
+ "属性": "onSave",
3564
+ "描述": "保存一行的时候触发",
3565
+ "类型": "`(key: Key, row: T,originRow:T,newLine?:newLineConfig) => Promise<any>`",
3566
+ "默认值": "-"
3567
+ },
3568
+ {
3569
+ "属性": "saveText",
3570
+ "描述": "保存一行的文字",
3571
+ "类型": "`React.ReactNode`",
3572
+ "默认值": "`保存`"
3573
+ },
3574
+ {
3575
+ "属性": "onDelete",
3576
+ "描述": "删除一行的时候触发",
3577
+ "类型": "`(key: Key, row: T) => Promise<any>`",
3578
+ "默认值": "-"
3579
+ },
3580
+ {
3581
+ "属性": "deleteText",
3582
+ "描述": "删除一行的文字",
3583
+ "类型": "`React.ReactNode`",
3584
+ "默认值": "`删除`"
3585
+ },
3586
+ {
3587
+ "属性": "onCancel",
3588
+ "描述": "取消编辑一行时触发",
3589
+ "类型": "`(key: Key, row: T,originRow:T,newLine?:newLineConfig) => Promise<any>`",
3590
+ "默认值": "-"
3591
+ },
3592
+ {
3593
+ "属性": "cancelText",
3594
+ "描述": "取消编辑一行的文字",
3595
+ "类型": "`React.ReactNode`",
3596
+ "默认值": "`取消`"
3597
+ },
3598
+ {
3599
+ "属性": "actionRender",
3600
+ "描述": "自定义编辑模式的操作栏",
3601
+ "类型": "`(row: T, config: ActionRenderConfig<T>) => ReactNode[]`",
3602
+ "默认值": "-"
3603
+ },
3604
+ {
3605
+ "属性": "deletePopconfirmMessage",
3606
+ "描述": "删除时弹出的确认框提示消息",
3607
+ "类型": "`ReactNode`",
3608
+ "默认值": "`删除此项?`"
3609
+ },
3610
+ {
3611
+ "属性": "onlyOneLineEditorAlertMessage",
3612
+ "描述": "只能编辑一行的的提示",
3613
+ "类型": "`ReactNode`",
3614
+ "默认值": "`只能同时编辑一行`"
3615
+ },
3616
+ {
3617
+ "属性": "onlyAddOneLineAlertMessage",
3618
+ "描述": "只能同时新增一行的提示",
3619
+ "类型": "`ReactNode`",
3620
+ "默认值": "`只能新增一行`"
3621
+ }
3622
+ ]
3623
+ }
3624
+ ]
3625
+ },
3626
+ {
3627
+ "packageName": "ProTable",
3628
+ "tableData": []
3629
+ },
3630
+ {
3631
+ "packageName": "ProTable",
3632
+ "tableData": []
3633
+ },
3634
+ {
3635
+ "packageName": "ProTable",
3636
+ "tableData": [
3637
+ {
3638
+ "title": "ProTable - ProTable",
3639
+ "table": [
3640
+ {
3641
+ "属性": "request",
3642
+ "描述": "获取 `dataSource` 的方法",
3643
+ "类型": "`(params?: {pageSize,current},sort,filter) => {data,success,total}`",
3644
+ "默认值": "-"
3645
+ },
3646
+ {
3647
+ "属性": "params",
3648
+ "描述": "用于 `request` 查询的额外参数,一旦变化会触发重新加载",
3649
+ "类型": "`object`",
3650
+ "默认值": "-"
3651
+ },
3652
+ {
3653
+ "属性": "postData",
3654
+ "描述": "对通过 `request` 获取的数据进行处理",
3655
+ "类型": "`(data: T[]) => T[]`",
3656
+ "默认值": "-"
3657
+ },
3658
+ {
3659
+ "属性": "defaultData",
3660
+ "描述": "默认的数据",
3661
+ "类型": "`T[]`",
3662
+ "默认值": "-"
3663
+ },
3664
+ {
3665
+ "属性": "dataSource",
3666
+ "描述": "Table 的数据,ProTable 推荐使用 `request` 来加载",
3667
+ "类型": "`T[]`",
3668
+ "默认值": "-"
3669
+ },
3670
+ {
3671
+ "属性": "onDataSourceChange",
3672
+ "描述": "Table 的数据发生改变时触发",
3673
+ "类型": "`(dataSource: T[]) => void`",
3674
+ "默认值": "-"
3675
+ },
3676
+ {
3677
+ "属性": "actionRef",
3678
+ "描述": "Table action 的引用,便于自定义触发",
3679
+ "类型": "`MutableRefObject<ActionType>`",
3680
+ "默认值": "-"
3681
+ },
3682
+ {
3683
+ "属性": "formRef",
3684
+ "描述": "可以获取到查询表单的 form 实例,用于一些灵活的配置",
3685
+ "类型": "`MutableRefObject<FormInstance>`",
3686
+ "默认值": "-"
3687
+ },
3688
+ {
3689
+ "属性": "toolBarRender",
3690
+ "描述": "渲染工具栏,支持返回一个 dom 数组,会自动增加 margin-right",
3691
+ "类型": "`(action) => ReactNode[]`",
3692
+ "默认值": "-"
3693
+ },
3694
+ {
3695
+ "属性": "onLoad",
3696
+ "描述": "数据加载完成后触发,会多次触发",
3697
+ "类型": "`(dataSource: T[]) => void`",
3698
+ "默认值": "-"
3699
+ },
3700
+ {
3701
+ "属性": "onLoadingChange",
3702
+ "描述": "loading 被修改时触发,一般是网络请求导致的",
3703
+ "类型": "`(loading:boolean)=>void`",
3704
+ "默认值": "-"
3705
+ },
3706
+ {
3707
+ "属性": "onRequestError",
3708
+ "描述": "数据加载失败时触发",
3709
+ "类型": "`(error) => void`",
3710
+ "默认值": "-"
3711
+ },
3712
+ {
3713
+ "属性": "tableClassName",
3714
+ "描述": "封装的 table 的 className",
3715
+ "类型": "`string`",
3716
+ "默认值": "-"
3717
+ },
3718
+ {
3719
+ "属性": "tableStyle",
3720
+ "描述": "封装的 table 的 style",
3721
+ "类型": "-"
3722
+ },
3723
+ {
3724
+ "属性": "options",
3725
+ "描述": "table 工具栏,设为 false 时不显示,传入 function 会点击时触发",
3726
+ "类型": "`{{ density?: boolean, fullScreen?: boolean | function, reload?: boolean | function, reloadIcon?: React.ReactNode, densityIcon?: React.ReactNode, setting?: boolean |` [SettingOptionType](#菜单栏-options-配置) `}}`",
3727
+ "默认值": "`{ fullScreen: false, reload: true, density: true, setting: true }`"
3728
+ },
3729
+ {
3730
+ "属性": "search",
3731
+ "描述": "是否显示搜索表单,传入对象时为搜索表单的配置",
3732
+ "类型": "`false` | [SearchConfig](#search-搜索表单)",
3733
+ "默认值": "-"
3734
+ },
3735
+ {
3736
+ "属性": "defaultSize",
3737
+ "描述": "默认的 size",
3738
+ "类型": "SizeType",
3739
+ "默认值": "-"
3740
+ },
3741
+ {
3742
+ "属性": "dateFormatter",
3743
+ "描述": "转化 moment 格式数据为特定类型,false 不做转化",
3744
+ "类型": "`\"string\"` | `\"number\"` | ((value: Moment, valueType: string) => string | number) | `false`",
3745
+ "默认值": "`\"string\"`"
3746
+ },
3747
+ {
3748
+ "属性": "beforeSearchSubmit",
3749
+ "描述": "搜索之前进行一些修改",
3750
+ "类型": "`(params:T)=>T`",
3751
+ "默认值": "-"
3752
+ },
3753
+ {
3754
+ "属性": "onSizeChange",
3755
+ "描述": "table 尺寸发生改变",
3756
+ "类型": "`(size: 'default' | 'middle' | 'small') => void`",
3757
+ "默认值": "-"
3758
+ },
3759
+ {
3760
+ "属性": "type",
3761
+ "描述": "pro-table 类型",
3762
+ "类型": "`\"form\"`",
3763
+ "默认值": "-"
3764
+ },
3765
+ {
3766
+ "属性": "form",
3767
+ "描述": "antd form 的配置",
3768
+ "类型": "-"
3769
+ },
3770
+ {
3771
+ "属性": "onSubmit",
3772
+ "描述": "提交表单时触发",
3773
+ "类型": "`(params: U) => void`",
3774
+ "默认值": "-"
3775
+ },
3776
+ {
3777
+ "属性": "onReset",
3778
+ "描述": "重置表单时触发",
3779
+ "类型": "`() => void`",
3780
+ "默认值": "-"
3781
+ },
3782
+ {
3783
+ "属性": "columnEmptyText",
3784
+ "描述": "空值时的显示,不设置时显示 `-`, false 可以关闭此功能",
3785
+ "类型": "`string` | `false`",
3786
+ "默认值": "false"
3787
+ },
3788
+ {
3789
+ "属性": "tableRender",
3790
+ "描述": "自定义渲染表格函数",
3791
+ "类型": "`(props,dom,domList:{ toolbar,alert,table}) => ReactNode`",
3792
+ "默认值": "-"
3793
+ },
3794
+ {
3795
+ "属性": "toolbar",
3796
+ "描述": "透传 `ListToolBar` 配置项",
3797
+ "类型": "-"
3798
+ },
3799
+ {
3800
+ "属性": "tableExtraRender",
3801
+ "描述": "自定义表格的主体函数",
3802
+ "类型": "`(props: ProTableProps<T, U>, dataSource: T[]) => ReactNode;`",
3803
+ "默认值": "-"
3804
+ },
3805
+ {
3806
+ "属性": "manualRequest",
3807
+ "描述": "是否需要手动触发首次请求,配置为 `true` 时不可隐藏搜索表单",
3808
+ "类型": "`boolean`",
3809
+ "默认值": "false"
3810
+ },
3811
+ {
3812
+ "属性": "editable",
3813
+ "描述": "可编辑表格的相关配置",
3814
+ "类型": "-"
3815
+ },
3816
+ {
3817
+ "属性": "cardBordered",
3818
+ "描述": "Table 和 Search 外围 Card 组件的边框",
3819
+ "类型": "`boolean | {search?: boolean, table?: boolean}`",
3820
+ "默认值": "false"
3821
+ },
3822
+ {
3823
+ "属性": "ghost",
3824
+ "描述": "幽灵模式,即是否取消表格区域的 padding",
3825
+ "类型": "`boolean`",
3826
+ "默认值": "false"
3827
+ },
3828
+ {
3829
+ "属性": "debounceTime",
3830
+ "描述": "防抖时间",
3831
+ "类型": "`number`",
3832
+ "默认值": "10"
3833
+ },
3834
+ {
3835
+ "属性": "revalidateOnFocus",
3836
+ "描述": "窗口聚焦时自动重新请求",
3837
+ "类型": "`boolean`",
3838
+ "默认值": "`true`"
3839
+ },
3840
+ {
3841
+ "属性": "columnsState",
3842
+ "描述": "受控的列状态,可以操作显示隐藏",
3843
+ "类型": "`ColumnStateType`",
3844
+ "默认值": "-"
3845
+ },
3846
+ {
3847
+ "属性": "ErrorBoundary",
3848
+ "描述": "自带了错误处理功能,防止白屏,`ErrorBoundary=false` 关闭默认错误边界",
3849
+ "类型": "`ReactNode`",
3850
+ "默认值": "内置 ErrorBoundary"
3851
+ }
3852
+ ]
3853
+ },
3854
+ {
3855
+ "title": "ProTable - RecordCreator",
3856
+ "table": [
3857
+ {
3858
+ "属性": "record",
3859
+ "描述": "需要新增的行数据,一般来说包含唯一 key",
3860
+ "类型": "`T`",
3861
+ "默认值": "`{}`"
3862
+ },
3863
+ {
3864
+ "属性": "position",
3865
+ "描述": "行增加在哪里,开始或者末尾",
3866
+ "类型": "`top` | `bottom`",
3867
+ "默认值": "`bottom`"
3868
+ },
3869
+ {
3870
+ "属性": "(...buttonProps)",
3871
+ "描述": "antd 的 [ButtonProps](https://ant.design/components/button-cn/#API)",
3872
+ "类型": "ButtonProps",
3873
+ "默认值": "—"
3874
+ }
3875
+ ]
3876
+ },
3877
+ {
3878
+ "title": "ProTable - ColumnStateType",
3879
+ "table": [
3880
+ {
3881
+ "属性": "defaultValue",
3882
+ "描述": "列状态的默认值,只有初次生效,并用于重置使用",
3883
+ "类型": "`Record<string, ColumnsState>;`",
3884
+ "默认值": "-"
3885
+ },
3886
+ {
3887
+ "属性": "value",
3888
+ "描述": "列状态的值,支持受控模式",
3889
+ "类型": "`Record<string, ColumnsState>;`",
3890
+ "默认值": "-"
3891
+ },
3892
+ {
3893
+ "属性": "onChange",
3894
+ "描述": "列状态的值发生改变之后触发",
3895
+ "类型": "`(value:Record<string, ColumnsState>)=>void`",
3896
+ "默认值": "-"
3897
+ },
3898
+ {
3899
+ "属性": "persistenceKey",
3900
+ "描述": "持久化列的 key,用于判断是否是同一个 table",
3901
+ "类型": "`string | number`",
3902
+ "默认值": "-"
3903
+ },
3904
+ {
3905
+ "属性": "persistenceType",
3906
+ "描述": "持久化列的类型,localStorage 设置在关闭浏览器后也是存在的,sessionStorage 关闭浏览器后会丢失",
3907
+ "类型": "`localStorage | sessionStorage`",
3908
+ "默认值": "-"
3909
+ }
3910
+ ]
3911
+ },
3912
+ {
3913
+ "title": "ProTable - Search 搜索表单",
3914
+ "table": [
3915
+ {
3916
+ "属性": "filterType",
3917
+ "描述": "过滤表单类型",
3918
+ "类型": "`'query'` | `'light'`",
3919
+ "默认值": "`'query'`"
3920
+ },
3921
+ {
3922
+ "属性": "searchText",
3923
+ "描述": "查询按钮的文本",
3924
+ "类型": "`string`",
3925
+ "默认值": "查询"
3926
+ },
3927
+ {
3928
+ "属性": "resetText",
3929
+ "描述": "重置按钮的文本",
3930
+ "类型": "`string`",
3931
+ "默认值": "重置"
3932
+ },
3933
+ {
3934
+ "属性": "submitText",
3935
+ "描述": "提交按钮的文本",
3936
+ "类型": "`string`",
3937
+ "默认值": "提交"
3938
+ },
3939
+ {
3940
+ "属性": "labelWidth",
3941
+ "描述": "标签的宽度",
3942
+ "类型": "`'number'` | `'auto'`",
3943
+ "默认值": "80"
3944
+ },
3945
+ {
3946
+ "属性": "span",
3947
+ "描述": "配置查询表单的列数",
3948
+ "类型": "`'number'` | [`'ColConfig'`](#ColConfig)",
3949
+ "默认值": "defaultColConfig"
3950
+ },
3951
+ {
3952
+ "属性": "className",
3953
+ "描述": "封装的搜索 Form 的 className",
3954
+ "类型": "`string`",
3955
+ "默认值": "-"
3956
+ },
3957
+ {
3958
+ "属性": "collapseRender",
3959
+ "描述": "收起按钮的 render",
3960
+ "类型": "`((collapsed: boolean,showCollapseButton?: boolean) => ReactNode)`|`false`",
3961
+ "默认值": "-"
3962
+ },
3963
+ {
3964
+ "属性": "defaultCollapsed",
3965
+ "描述": "默认是否收起",
3966
+ "类型": "`boolean`",
3967
+ "默认值": "`true`"
3968
+ },
3969
+ {
3970
+ "属性": "collapsed",
3971
+ "描述": "是否收起",
3972
+ "类型": "`boolean`",
3973
+ "默认值": "-"
3974
+ },
3975
+ {
3976
+ "属性": "onCollapse",
3977
+ "描述": "收起按钮的事件",
3978
+ "类型": "`(collapsed: boolean) => void;`",
3979
+ "默认值": "-"
3980
+ },
3981
+ {
3982
+ "属性": "optionRender",
3983
+ "描述": "自定义操作栏",
3984
+ "类型": "`((searchConfig,formProps,dom) => ReactNode[])`|`false`",
3985
+ "默认值": "-"
3986
+ },
3987
+ {
3988
+ "属性": "showHiddenNum",
3989
+ "描述": "是否显示收起之后显示隐藏个数",
3990
+ "类型": "`boolean`",
3991
+ "默认值": "`false`"
3992
+ }
3993
+ ]
3994
+ },
3995
+ {
3996
+ "title": "ProTable - Columns 列定义",
3997
+ "table": [
3998
+ {
3999
+ "属性": "title",
4000
+ "描述": "与 antd 中基本相同,但是支持通过传入一个方法",
4001
+ "类型": "`ReactNode | ((config: ProColumnType<T>, type: ProTableTypes) => ReactNode)`",
4002
+ "默认值": "-"
4003
+ },
4004
+ {
4005
+ "属性": "tooltip",
4006
+ "描述": "会在 title 之后展示一个 icon,hover 之后提示一些信息",
4007
+ "类型": "`string`",
4008
+ "默认值": "-"
4009
+ },
4010
+ {
4011
+ "属性": "ellipsis",
4012
+ "描述": "是否自动缩略",
4013
+ "类型": "`boolean` | `{showTitle?: boolean}`",
4014
+ "默认值": "-"
4015
+ },
4016
+ {
4017
+ "属性": "copyable",
4018
+ "描述": "是否支持复制",
4019
+ "类型": "`boolean`",
4020
+ "默认值": "-"
4021
+ },
4022
+ {
4023
+ "属性": "valueEnum",
4024
+ "描述": "值的枚举,会自动转化把值当成 key 来取出要显示的内容",
4025
+ "类型": "-"
4026
+ },
4027
+ {
4028
+ "属性": "valueType",
4029
+ "描述": "值的类型,会生成不同的渲染器",
4030
+ "类型": "`text`"
4031
+ },
4032
+ {
4033
+ "属性": "order",
4034
+ "描述": "查询表单中的权重,权重大排序靠前",
4035
+ "类型": "`number`",
4036
+ "默认值": "-"
4037
+ },
4038
+ {
4039
+ "属性": "fieldProps",
4040
+ "描述": "查询表单的 props,会透传给表单项,如果渲染出来是 Input,就支持 Input 的所有 props,同理如果是 select,也支持 select 的所有 props。也支持方法传入",
4041
+ "类型": "`(form,config)=>Record | Record`",
4042
+ "默认值": "-"
4043
+ },
4044
+ {
4045
+ "属性": "`formItemProps`",
4046
+ "描述": "传递给 Form.Item 的配置,可以配置 rules,但是默认的查询表单 rules 是不生效的。需要配置 `ignoreRules`",
4047
+ "类型": "`(form,config)=>formItemProps` | `formItemProps`",
4048
+ "默认值": "-"
4049
+ },
4050
+ {
4051
+ "属性": "renderText",
4052
+ "描述": "类似 table 的 render,但是必须返回 string,如果只是希望转化枚举,可以使用 [valueEnum](/components/schema#valueenum)",
4053
+ "类型": "`(text: any,record: T,index: number,action: UseFetchDataAction<T>) => string`",
4054
+ "默认值": "-"
4055
+ },
4056
+ {
4057
+ "属性": "render",
4058
+ "描述": "类似 table 的 render,第一个参数变成了 dom,增加了第四个参数 action",
4059
+ "类型": "`(text: ReactNode,record: T,index: number,action: UseFetchDataAction<T>) => ReactNode | ReactNode[]`",
4060
+ "默认值": "-"
4061
+ },
4062
+ {
4063
+ "属性": "renderFormItem",
4064
+ "描述": "渲染查询表单的输入组件",
4065
+ "类型": "`(item,{ type, defaultRender, formItemProps, fieldProps, ...rest },form) => ReactNode`",
4066
+ "默认值": "-"
4067
+ },
4068
+ {
4069
+ "属性": "search",
4070
+ "描述": "配置列的搜索相关,false 为隐藏",
4071
+ "类型": "`false` | `{ transform: (value: any) => any }`",
4072
+ "默认值": "true"
4073
+ },
4074
+ {
4075
+ "属性": "search.transform",
4076
+ "描述": "转化值的 key, 一般用于时间区间的转化",
4077
+ "类型": "`(value: any) => any`",
4078
+ "默认值": "-"
4079
+ },
4080
+ {
4081
+ "属性": "在编辑表格中是否可编辑的,函数的参数和 table 的 render 一样",
4082
+ "描述": "`false` | `(text: any, record: T,index: number) => boolean`",
4083
+ "类型": "true"
4084
+ },
4085
+ {
4086
+ "属性": "colSize",
4087
+ "描述": "一个表单项占用的格子数量,`占比= colSize*span`,`colSize` 默认为 1 ,`span` 为 8,`span`是`form={{span:8}}` 全局设置的",
4088
+ "类型": "`number`",
4089
+ "默认值": "-"
4090
+ },
4091
+ {
4092
+ "属性": "hideInSearch",
4093
+ "描述": "在查询表单中不展示此项",
4094
+ "类型": "`boolean`",
4095
+ "默认值": "-"
4096
+ },
4097
+ {
4098
+ "属性": "hideInTable",
4099
+ "描述": "在 Table 中不展示此列",
4100
+ "类型": "`boolean`",
4101
+ "默认值": "-"
4102
+ },
4103
+ {
4104
+ "属性": "hideInForm",
4105
+ "描述": "在 Form 中不展示此列",
4106
+ "类型": "`boolean`",
4107
+ "默认值": "-"
4108
+ },
4109
+ {
4110
+ "属性": "hideInDescriptions",
4111
+ "描述": "在 Descriptions 中不展示此列",
4112
+ "类型": "`boolean`",
4113
+ "默认值": "-"
4114
+ },
4115
+ {
4116
+ "属性": "filters",
4117
+ "描述": "表头的筛选菜单项,当值为 true 时,自动使用 valueEnum 生成",
4118
+ "类型": "`boolean` | `object[]`",
4119
+ "默认值": "false"
4120
+ },
4121
+ {
4122
+ "属性": "onFilter",
4123
+ "描述": "筛选表单,为 true 时使用 ProTable 自带的,为 false 时关闭本地筛选",
4124
+ "类型": "`(value, record) => boolean` | `false`",
4125
+ "默认值": "false"
4126
+ },
4127
+ {
4128
+ "属性": "request",
4129
+ "描述": "从服务器请求枚举",
4130
+ "类型": "-"
4131
+ },
4132
+ {
4133
+ "属性": "initialValue",
4134
+ "描述": "查询表单项初始值",
4135
+ "类型": "`any`",
4136
+ "默认值": "-"
4137
+ },
4138
+ {
4139
+ "属性": "disable",
4140
+ "描述": "列设置中`disabled`的状态",
4141
+ "类型": "`boolean` | `{ checkbox: boolean; }`",
4142
+ "默认值": "-"
4143
+ }
4144
+ ]
4145
+ },
4146
+ {
4147
+ "title": "ProTable - 批量操作",
4148
+ "table": [
4149
+ {
4150
+ "属性": "alwaysShowAlert",
4151
+ "描述": "总是展示 alert,默认无选择不展示(`rowSelection`内置属性)",
4152
+ "类型": "`boolean`",
4153
+ "默认值": "-"
4154
+ },
4155
+ {
4156
+ "属性": "tableAlertRender",
4157
+ "描述": "自定义批量操作工具栏左侧信息区域,false 时不显示",
4158
+ "类型": "`({ selectedRowKeys: Key[], selectedRows: T[], onCleanSelected: ()=>void }) => ReactNode)`|`false`",
4159
+ "默认值": "-"
4160
+ },
4161
+ {
4162
+ "属性": "tableAlertOptionRender",
4163
+ "描述": "自定义批量操作工具栏右侧选项区域,false 时不显示",
4164
+ "类型": "`({ selectedRowKeys: Key[], selectedRows: T[], onCleanSelected: ()=>void }) => ReactNode)`|`false`",
4165
+ "默认值": "-"
4166
+ }
4167
+ ]
4168
+ },
4169
+ {
4170
+ "title": "ProTable - ListToolBarProps",
4171
+ "table": [
4172
+ {
4173
+ "参数": "title",
4174
+ "说明": "标题",
4175
+ "类型": "`ReactNode`",
4176
+ "默认值": "-"
4177
+ },
4178
+ {
4179
+ "参数": "subTitle",
4180
+ "说明": "子标题",
4181
+ "类型": "`ReactNode`",
4182
+ "默认值": "-"
4183
+ },
4184
+ {
4185
+ "参数": "tooltip",
4186
+ "说明": "tooltip 描述",
4187
+ "类型": "`string`",
4188
+ "默认值": "-"
4189
+ },
4190
+ {
4191
+ "参数": "search",
4192
+ "说明": "查询区",
4193
+ "类型": "`ReactNode` | `SearchProps`",
4194
+ "默认值": "-"
4195
+ },
4196
+ {
4197
+ "参数": "actions",
4198
+ "说明": "操作区",
4199
+ "类型": "`ReactNode[]`",
4200
+ "默认值": "-"
4201
+ },
4202
+ {
4203
+ "参数": "settings",
4204
+ "说明": "设置区",
4205
+ "类型": "`(ReactNode | Setting)[]`",
4206
+ "默认值": "-"
4207
+ },
4208
+ {
4209
+ "参数": "filter",
4210
+ "说明": "过滤区,通常配合 `LightFilter` 使用",
4211
+ "类型": "`ReactNode`",
4212
+ "默认值": "-"
4213
+ },
4214
+ {
4215
+ "参数": "multipleLine",
4216
+ "说明": "是否多行展示",
4217
+ "类型": "`boolean`",
4218
+ "默认值": "`false`"
4219
+ },
4220
+ {
4221
+ "参数": "menu",
4222
+ "说明": "菜单配置",
4223
+ "类型": "`ListToolBarMenu`",
4224
+ "默认值": "-"
4225
+ },
4226
+ {
4227
+ "参数": "tabs",
4228
+ "说明": "标签页配置,仅当 `multipleLine` 为 true 时有效",
4229
+ "类型": "`ListToolBarTabs`",
4230
+ "默认值": "-"
4231
+ }
4232
+ ]
4233
+ },
4234
+ {
4235
+ "title": "ProTable - Setting",
4236
+ "table": [
4237
+ {
4238
+ "参数": "icon",
4239
+ "说明": "图标",
4240
+ "类型": "`ReactNode`",
4241
+ "默认值": "-"
4242
+ },
4243
+ {
4244
+ "参数": "tooltip",
4245
+ "说明": "tooltip 描述",
4246
+ "类型": "`string`",
4247
+ "默认值": "-"
4248
+ },
4249
+ {
4250
+ "参数": "key",
4251
+ "说明": "操作唯一标识",
4252
+ "类型": "`string`",
4253
+ "默认值": "-"
4254
+ },
4255
+ {
4256
+ "参数": "onClick",
4257
+ "说明": "设置被触发",
4258
+ "类型": "`(key: string)=>void`",
4259
+ "默认值": "-"
4260
+ }
4261
+ ]
4262
+ },
4263
+ {
4264
+ "title": "ProTable - ListToolBarMenu",
4265
+ "table": [
4266
+ {
4267
+ "参数": "type",
4268
+ "说明": "类型",
4269
+ "类型": "`inline` | `dropdown` | `tab`",
4270
+ "默认值": "`inline`"
4271
+ },
4272
+ {
4273
+ "参数": "activeKey",
4274
+ "说明": "当前值",
4275
+ "类型": "`string`",
4276
+ "默认值": "-"
4277
+ },
4278
+ {
4279
+ "参数": "items",
4280
+ "说明": "菜单项",
4281
+ "类型": "`{ key: string; label: ReactNode }[]`",
4282
+ "默认值": "-"
4283
+ },
4284
+ {
4285
+ "参数": "onChange",
4286
+ "说明": "切换菜单的回调",
4287
+ "类型": "`(activeKey)=>void`",
4288
+ "默认值": "-"
4289
+ }
4290
+ ]
4291
+ },
4292
+ {
4293
+ "title": "ProTable - ListToolBarTabs",
4294
+ "table": [
4295
+ {
4296
+ "参数": "activeKey",
4297
+ "说明": "当前选中项",
4298
+ "类型": "`string`",
4299
+ "默认值": "-"
4300
+ },
4301
+ {
4302
+ "参数": "items",
4303
+ "说明": "菜单项",
4304
+ "类型": "`{ key: string; tab: ReactNode }[]`",
4305
+ "默认值": "-"
4306
+ },
4307
+ {
4308
+ "参数": "onChange",
4309
+ "说明": "切换菜单的回调",
4310
+ "类型": "`(activeKey)=>void`",
4311
+ "默认值": "-"
4312
+ }
4313
+ ]
4314
+ },
4315
+ {
4316
+ "title": "ProTable - TableDropdown",
4317
+ "table": [
4318
+ {
4319
+ "参数": "key",
4320
+ "说明": "唯一标志",
4321
+ "类型": "`string`",
4322
+ "默认值": "-"
4323
+ },
4324
+ {
4325
+ "参数": "name",
4326
+ "说明": "内容",
4327
+ "类型": "`ReactNode`",
4328
+ "默认值": "-"
4329
+ },
4330
+ {
4331
+ "参数": "(...Menu.Item)",
4332
+ "说明": "antd 的 [Menu.Item](https://ant.design/components/menu-cn/#Menu.Item)",
4333
+ "类型": "`Menu.Item`",
4334
+ "默认值": "-"
4335
+ }
4336
+ ]
4337
+ }
4338
+ ]
4339
+ }
4340
+ ]