@next-bricks/presentational-bricks 1.245.3 → 1.247.0
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/CHANGELOG.md +34 -0
- package/deploy/contract.yaml +96 -96
- package/dist/bricks.json +17 -17
- package/dist/index.f146e205.js +2 -0
- package/dist/index.f146e205.js.map +1 -0
- package/dist/stories.json +181 -152
- package/package.json +2 -2
- package/dist/index.b0acbe42.js +0 -2
- package/dist/index.b0acbe42.js.map +0 -1
package/dist/stories.json
CHANGED
|
@@ -2104,10 +2104,8 @@
|
|
|
2104
2104
|
"label": "Tags",
|
|
2105
2105
|
"useBrick": {
|
|
2106
2106
|
"brick": "presentational-bricks.brick-tag",
|
|
2107
|
-
"transform": {
|
|
2108
|
-
"tagList": "@{tags}"
|
|
2109
|
-
},
|
|
2110
2107
|
"properties": {
|
|
2108
|
+
"tagList": "<% DATA.tags %>",
|
|
2111
2109
|
"configProps": {
|
|
2112
2110
|
"color": "orange"
|
|
2113
2111
|
},
|
|
@@ -2132,10 +2130,8 @@
|
|
|
2132
2130
|
"label": "开始时间",
|
|
2133
2131
|
"useBrick": {
|
|
2134
2132
|
"brick": "presentational-bricks.brick-humanize-time",
|
|
2135
|
-
"transform": {
|
|
2136
|
-
"value": "@{ctime}"
|
|
2137
|
-
},
|
|
2138
2133
|
"properties": {
|
|
2134
|
+
"value": "<% DATA.ctime %>",
|
|
2139
2135
|
"formatter": "full"
|
|
2140
2136
|
}
|
|
2141
2137
|
}
|
|
@@ -2175,10 +2171,8 @@
|
|
|
2175
2171
|
"group": "a",
|
|
2176
2172
|
"useBrick": {
|
|
2177
2173
|
"brick": "presentational-bricks.brick-tag",
|
|
2178
|
-
"transform": {
|
|
2179
|
-
"tagList": "@{tags}"
|
|
2180
|
-
},
|
|
2181
2174
|
"properties": {
|
|
2175
|
+
"tagList": "<% DATA.tags %>",
|
|
2182
2176
|
"configProps": {
|
|
2183
2177
|
"color": "orange"
|
|
2184
2178
|
},
|
|
@@ -2227,10 +2221,8 @@
|
|
|
2227
2221
|
"group": "c",
|
|
2228
2222
|
"useBrick": {
|
|
2229
2223
|
"brick": "presentational-bricks.brick-tag",
|
|
2230
|
-
"transform": {
|
|
2231
|
-
"tagList": "@{tags}"
|
|
2232
|
-
},
|
|
2233
2224
|
"properties": {
|
|
2225
|
+
"tagList": "<% DATA.tags %>",
|
|
2234
2226
|
"configProps": {
|
|
2235
2227
|
"color": "orange"
|
|
2236
2228
|
},
|
|
@@ -2278,21 +2270,23 @@
|
|
|
2278
2270
|
"type": "BrickDescriptionsItemProps[]",
|
|
2279
2271
|
"required": "true",
|
|
2280
2272
|
"default": "-",
|
|
2281
|
-
"description": "描述列表项,扩展自 ant-design DescriptionItem 相关配置项,额外扩展项如下,其他项查阅:[
|
|
2273
|
+
"description": "描述列表项,扩展自 ant-design DescriptionItem 相关配置项,额外扩展项如下,其他项查阅:[DescriptionItem](https://ant.design/components/descriptions-cn/#DescriptionItem)"
|
|
2282
2274
|
},
|
|
2283
2275
|
{
|
|
2284
2276
|
"name": "showCard",
|
|
2285
2277
|
"type": "boolean",
|
|
2286
2278
|
"required": "false",
|
|
2287
2279
|
"default": "true",
|
|
2288
|
-
"description": "是否显示卡片"
|
|
2280
|
+
"description": "是否显示卡片",
|
|
2281
|
+
"group": "ui"
|
|
2289
2282
|
},
|
|
2290
2283
|
{
|
|
2291
2284
|
"name": "column",
|
|
2292
2285
|
"type": "number|object",
|
|
2293
2286
|
"required": "false",
|
|
2294
2287
|
"default": "3",
|
|
2295
|
-
"description": "一行的 DescriptionItems 数量,可以写成像素值或支持响应式的对象写法 { xs: 8, sm: 16, md: 24}"
|
|
2288
|
+
"description": "一行的 DescriptionItems 数量,可以写成像素值或支持响应式的对象写法 { xs: 8, sm: 16, md: 24}",
|
|
2289
|
+
"group": "ui"
|
|
2296
2290
|
},
|
|
2297
2291
|
{
|
|
2298
2292
|
"name": "layout",
|
|
@@ -2300,7 +2294,7 @@
|
|
|
2300
2294
|
"required": "false",
|
|
2301
2295
|
"default": "horizontal",
|
|
2302
2296
|
"description": "描述布局",
|
|
2303
|
-
"group": "
|
|
2297
|
+
"group": "ui"
|
|
2304
2298
|
},
|
|
2305
2299
|
{
|
|
2306
2300
|
"name": "bordered",
|
|
@@ -2308,7 +2302,7 @@
|
|
|
2308
2302
|
"required": "false",
|
|
2309
2303
|
"default": "false",
|
|
2310
2304
|
"description": "是否展示边框",
|
|
2311
|
-
"group": "
|
|
2305
|
+
"group": "ui"
|
|
2312
2306
|
},
|
|
2313
2307
|
{
|
|
2314
2308
|
"name": "size",
|
|
@@ -2316,23 +2310,21 @@
|
|
|
2316
2310
|
"required": "false",
|
|
2317
2311
|
"default": "-",
|
|
2318
2312
|
"description": "设置列表的大小。可以设置为 middle 、small, 或不填(只有设置 bordered={true} 生效)",
|
|
2319
|
-
"group": "
|
|
2313
|
+
"group": "ui"
|
|
2320
2314
|
},
|
|
2321
2315
|
{
|
|
2322
2316
|
"name": "configProps",
|
|
2323
2317
|
"type": "DescriptionsProps",
|
|
2324
2318
|
"required": "false",
|
|
2325
2319
|
"default": "-",
|
|
2326
|
-
"description": "ant-design 相关配置项,具体查阅:[
|
|
2327
|
-
"group": "advanced"
|
|
2320
|
+
"description": "ant-design 相关配置项,具体查阅:[Descriptions](https://ant.design/components/descriptions-cn/#Descriptions)"
|
|
2328
2321
|
},
|
|
2329
2322
|
{
|
|
2330
2323
|
"name": "hideGroups",
|
|
2331
2324
|
"type": "string[] | string",
|
|
2332
2325
|
"required": "false",
|
|
2333
2326
|
"default": "-",
|
|
2334
|
-
"description": "设置需要隐藏的描述列表项。请先在 itemList 中定义列表项所属 group"
|
|
2335
|
-
"group": "advanced"
|
|
2327
|
+
"description": "设置需要隐藏的描述列表项。请先在 itemList 中定义列表项所属 group"
|
|
2336
2328
|
},
|
|
2337
2329
|
{
|
|
2338
2330
|
"name": "dataSource",
|
|
@@ -2340,8 +2332,7 @@
|
|
|
2340
2332
|
"required": "false",
|
|
2341
2333
|
"default": "-",
|
|
2342
2334
|
"deprecated": true,
|
|
2343
|
-
"description": "[已废弃]数据来源,通常来源于后台"
|
|
2344
|
-
"group": "advanced"
|
|
2335
|
+
"description": "[已废弃]数据来源,通常来源于后台"
|
|
2345
2336
|
}
|
|
2346
2337
|
],
|
|
2347
2338
|
"interface": [
|
|
@@ -4761,7 +4752,7 @@
|
|
|
4761
4752
|
{
|
|
4762
4753
|
"description": {
|
|
4763
4754
|
"title": "基础用法",
|
|
4764
|
-
"message": "
|
|
4755
|
+
"message": "注意对表格数据进行筛选时,需将页码恢复为第一页"
|
|
4765
4756
|
},
|
|
4766
4757
|
"brick": "presentational-bricks.brick-table",
|
|
4767
4758
|
"properties": {
|
|
@@ -4769,17 +4760,13 @@
|
|
|
4769
4760
|
"testid": "basic-demo"
|
|
4770
4761
|
},
|
|
4771
4762
|
"rowKey": "id",
|
|
4772
|
-
"page": "${query.page=1|number}",
|
|
4773
|
-
"pageSize": "${query.pageSize=10|number}",
|
|
4774
4763
|
"shouldUpdateUrlParams": false,
|
|
4775
4764
|
"rowDisabledConfig": {
|
|
4776
4765
|
"field": "name",
|
|
4777
4766
|
"value": "John Brown",
|
|
4778
4767
|
"operator": "$eq"
|
|
4779
4768
|
},
|
|
4780
|
-
"
|
|
4781
|
-
"rowSelection": true
|
|
4782
|
-
},
|
|
4769
|
+
"rowSelection": true,
|
|
4783
4770
|
"hiddenColumns": [
|
|
4784
4771
|
"name"
|
|
4785
4772
|
],
|
|
@@ -4817,11 +4804,9 @@
|
|
|
4817
4804
|
"dataIndex": "tags",
|
|
4818
4805
|
"useBrick": {
|
|
4819
4806
|
"brick": "presentational-bricks.brick-tag",
|
|
4820
|
-
"transform": {
|
|
4821
|
-
"tagList": "@{cellData}"
|
|
4822
|
-
},
|
|
4823
4807
|
"properties": {
|
|
4824
4808
|
"showCard": false,
|
|
4809
|
+
"tagList": "<% DATA.cellData %>",
|
|
4825
4810
|
"configProps": {
|
|
4826
4811
|
"color": "var(--color-brand)"
|
|
4827
4812
|
}
|
|
@@ -4834,10 +4819,8 @@
|
|
|
4834
4819
|
"dataIndex": "operate",
|
|
4835
4820
|
"useBrick": {
|
|
4836
4821
|
"brick": "presentational-bricks.brick-link",
|
|
4837
|
-
"transform": {
|
|
4838
|
-
"dataSource": "@{rowData}"
|
|
4839
|
-
},
|
|
4840
4822
|
"properties": {
|
|
4823
|
+
"dataSource": "<% DATA.rowData %>",
|
|
4841
4824
|
"notToJumpWhenEmpty": true,
|
|
4842
4825
|
"icon": {
|
|
4843
4826
|
"lib": "fa",
|
|
@@ -5021,19 +5004,16 @@
|
|
|
5021
5004
|
"expandedRowBrick": {
|
|
5022
5005
|
"useBrick": {
|
|
5023
5006
|
"brick": "presentational-bricks.brick-table",
|
|
5024
|
-
"transformFrom": "rowData",
|
|
5025
|
-
"transform": {
|
|
5026
|
-
"dataSource": {
|
|
5027
|
-
"list": "@{containerList}"
|
|
5028
|
-
}
|
|
5029
|
-
},
|
|
5030
5007
|
"properties": {
|
|
5008
|
+
"dataSource": {
|
|
5009
|
+
"list": "<% DATA.rowData.containerList %>"
|
|
5010
|
+
},
|
|
5031
5011
|
"style": {
|
|
5032
5012
|
"background": "#f5f5f5"
|
|
5033
5013
|
},
|
|
5034
5014
|
"showCard": false,
|
|
5015
|
+
"pagination": false,
|
|
5035
5016
|
"configProps": {
|
|
5036
|
-
"pagination": false,
|
|
5037
5017
|
"bordered": false
|
|
5038
5018
|
},
|
|
5039
5019
|
"columns": [
|
|
@@ -5051,10 +5031,8 @@
|
|
|
5051
5031
|
"dataIndex": "operate",
|
|
5052
5032
|
"useBrick": {
|
|
5053
5033
|
"brick": "presentational-bricks.brick-link",
|
|
5054
|
-
"transform": {
|
|
5055
|
-
"dataSource": "@{rowData}"
|
|
5056
|
-
},
|
|
5057
5034
|
"properties": {
|
|
5035
|
+
"dataSource": "<% DATA.rowData %>",
|
|
5058
5036
|
"notToJumpWhenEmpty": true,
|
|
5059
5037
|
"icon": {
|
|
5060
5038
|
"lib": "fa",
|
|
@@ -5167,8 +5145,6 @@
|
|
|
5167
5145
|
"testid": "customized-expand-icon-demo"
|
|
5168
5146
|
},
|
|
5169
5147
|
"rowKey": "id",
|
|
5170
|
-
"page": "${query.page=1|number}",
|
|
5171
|
-
"pageSize": "${query.pageSize=10|number}",
|
|
5172
5148
|
"expandIcon": {
|
|
5173
5149
|
"collapsedIcon": {
|
|
5174
5150
|
"lib": "fa",
|
|
@@ -5307,8 +5283,8 @@
|
|
|
5307
5283
|
"dataIndex": "branch",
|
|
5308
5284
|
"useBrick": {
|
|
5309
5285
|
"brick": "presentational-bricks.brick-link",
|
|
5310
|
-
"
|
|
5311
|
-
"label": "
|
|
5286
|
+
"properties": {
|
|
5287
|
+
"label": "<% DATA.cellData %>"
|
|
5312
5288
|
}
|
|
5313
5289
|
},
|
|
5314
5290
|
"cellStatus": {
|
|
@@ -5342,10 +5318,8 @@
|
|
|
5342
5318
|
"dataIndex": "status",
|
|
5343
5319
|
"useBrick": {
|
|
5344
5320
|
"brick": "presentational-bricks.brick-value-mapping",
|
|
5345
|
-
"transform": {
|
|
5346
|
-
"value": "@{cellData}"
|
|
5347
|
-
},
|
|
5348
5321
|
"properties": {
|
|
5322
|
+
"value": "<% DATA.cellData %>",
|
|
5349
5323
|
"mapping": {
|
|
5350
5324
|
"success": {
|
|
5351
5325
|
"color": "green"
|
|
@@ -5426,9 +5400,7 @@
|
|
|
5426
5400
|
"testid": "tree-data-demo"
|
|
5427
5401
|
},
|
|
5428
5402
|
"rowKey": "id",
|
|
5429
|
-
"
|
|
5430
|
-
"rowSelection": true
|
|
5431
|
-
},
|
|
5403
|
+
"rowSelection": true,
|
|
5432
5404
|
"columns": [
|
|
5433
5405
|
{
|
|
5434
5406
|
"title": "Name",
|
|
@@ -5451,10 +5423,8 @@
|
|
|
5451
5423
|
"dataIndex": "tags",
|
|
5452
5424
|
"useBrick": {
|
|
5453
5425
|
"brick": "presentational-bricks.brick-tag",
|
|
5454
|
-
"transform": {
|
|
5455
|
-
"tagList": "@{cellData}"
|
|
5456
|
-
},
|
|
5457
5426
|
"properties": {
|
|
5427
|
+
"tagList": "<% DATA.cellData %>",
|
|
5458
5428
|
"showCard": false,
|
|
5459
5429
|
"configProps": {
|
|
5460
5430
|
"color": "var(--color-brand)"
|
|
@@ -5468,10 +5438,8 @@
|
|
|
5468
5438
|
"dataIndex": "operate",
|
|
5469
5439
|
"useBrick": {
|
|
5470
5440
|
"brick": "presentational-bricks.brick-link",
|
|
5471
|
-
"transform": {
|
|
5472
|
-
"dataSource": "@{rowData}"
|
|
5473
|
-
},
|
|
5474
5441
|
"properties": {
|
|
5442
|
+
"dataSource": "<% DATA.rowData %>",
|
|
5475
5443
|
"notToJumpWhenEmpty": true,
|
|
5476
5444
|
"icon": {
|
|
5477
5445
|
"lib": "fa",
|
|
@@ -5591,10 +5559,8 @@
|
|
|
5591
5559
|
"rowKey": "id",
|
|
5592
5560
|
"tableDraggable": true,
|
|
5593
5561
|
"showCard": false,
|
|
5594
|
-
"
|
|
5595
|
-
|
|
5596
|
-
"pagination": false
|
|
5597
|
-
},
|
|
5562
|
+
"rowSelection": true,
|
|
5563
|
+
"pagination": false,
|
|
5598
5564
|
"columns": [
|
|
5599
5565
|
{
|
|
5600
5566
|
"title": "包名称",
|
|
@@ -5643,7 +5609,8 @@
|
|
|
5643
5609
|
},
|
|
5644
5610
|
{
|
|
5645
5611
|
"description": {
|
|
5646
|
-
"title": "前端搜索"
|
|
5612
|
+
"title": "前端搜索",
|
|
5613
|
+
"message": "前端搜索需要搭配构件的 `filterSourceData` 方法使用"
|
|
5647
5614
|
},
|
|
5648
5615
|
"brick": "basic-bricks.general-card",
|
|
5649
5616
|
"properties": {
|
|
@@ -5688,6 +5655,7 @@
|
|
|
5688
5655
|
{
|
|
5689
5656
|
"brick": "presentational-bricks.brick-table",
|
|
5690
5657
|
"properties": {
|
|
5658
|
+
"id": "front-search-table",
|
|
5691
5659
|
"dataset": {
|
|
5692
5660
|
"testid": "front-search-table"
|
|
5693
5661
|
},
|
|
@@ -5695,10 +5663,8 @@
|
|
|
5695
5663
|
"frontSearch": true,
|
|
5696
5664
|
"shouldUpdateUrlParams": false,
|
|
5697
5665
|
"showCard": false,
|
|
5698
|
-
"
|
|
5699
|
-
|
|
5700
|
-
"pagination": false
|
|
5701
|
-
},
|
|
5666
|
+
"rowSelection": true,
|
|
5667
|
+
"pagination": false,
|
|
5702
5668
|
"frontSearchFilterKeys": [
|
|
5703
5669
|
"packageName"
|
|
5704
5670
|
],
|
|
@@ -5751,7 +5717,8 @@
|
|
|
5751
5717
|
},
|
|
5752
5718
|
{
|
|
5753
5719
|
"description": {
|
|
5754
|
-
"title": "内容滚动"
|
|
5720
|
+
"title": "内容滚动",
|
|
5721
|
+
"message": "当宽度过小时,内容滑动显示"
|
|
5755
5722
|
},
|
|
5756
5723
|
"brick": "presentational-bricks.brick-table",
|
|
5757
5724
|
"properties": {
|
|
@@ -5895,7 +5862,7 @@
|
|
|
5895
5862
|
"title": "通知内容",
|
|
5896
5863
|
"useBrick": {
|
|
5897
5864
|
"brick": "presentational-bricks.markdown-display",
|
|
5898
|
-
"
|
|
5865
|
+
"properties": {
|
|
5899
5866
|
"value": "<% DATA.cellData || \"暂无数据\" %>"
|
|
5900
5867
|
}
|
|
5901
5868
|
}
|
|
@@ -5907,7 +5874,7 @@
|
|
|
5907
5874
|
"title": "告警维度",
|
|
5908
5875
|
"useBrick": {
|
|
5909
5876
|
"brick": "presentational-bricks.markdown-display",
|
|
5910
|
-
"
|
|
5877
|
+
"properties": {
|
|
5911
5878
|
"value": "<% DATA.cellData || \"暂无数据\" %>"
|
|
5912
5879
|
}
|
|
5913
5880
|
}
|
|
@@ -5919,15 +5886,15 @@
|
|
|
5919
5886
|
"title": "通知人",
|
|
5920
5887
|
"useBrick": {
|
|
5921
5888
|
"brick": "presentational-bricks.markdown-display",
|
|
5922
|
-
"
|
|
5889
|
+
"properties": {
|
|
5923
5890
|
"value": "<% DATA.cellData || \"暂无数据\" %>"
|
|
5924
5891
|
}
|
|
5925
5892
|
}
|
|
5926
5893
|
}
|
|
5927
5894
|
],
|
|
5895
|
+
"pagination": false,
|
|
5928
5896
|
"configProps": {
|
|
5929
|
-
"bordered": false
|
|
5930
|
-
"pagination": false
|
|
5897
|
+
"bordered": false
|
|
5931
5898
|
},
|
|
5932
5899
|
"showCard": false,
|
|
5933
5900
|
"style": {
|
|
@@ -5936,10 +5903,9 @@
|
|
|
5936
5903
|
},
|
|
5937
5904
|
"transform": {
|
|
5938
5905
|
"dataSource": {
|
|
5939
|
-
"list": "
|
|
5906
|
+
"list": "<% DATA.rowData.containerList %>"
|
|
5940
5907
|
}
|
|
5941
|
-
}
|
|
5942
|
-
"transformFrom": "rowData"
|
|
5908
|
+
}
|
|
5943
5909
|
}
|
|
5944
5910
|
},
|
|
5945
5911
|
"expandIconAsCell": false,
|
|
@@ -5968,9 +5934,7 @@
|
|
|
5968
5934
|
"pageSize": "${query.page_size=10|number}",
|
|
5969
5935
|
"shouldUpdateUrlParams": true,
|
|
5970
5936
|
"shouldRenderWhenUrlParamsUpdate": false,
|
|
5971
|
-
"
|
|
5972
|
-
"rowSelection": true
|
|
5973
|
-
},
|
|
5937
|
+
"rowSelection": true,
|
|
5974
5938
|
"rowKey": "name",
|
|
5975
5939
|
"columns": [
|
|
5976
5940
|
{
|
|
@@ -6081,7 +6045,7 @@
|
|
|
6081
6045
|
"title": "IP",
|
|
6082
6046
|
"useBrick": {
|
|
6083
6047
|
"brick": "span",
|
|
6084
|
-
"
|
|
6048
|
+
"properties": {
|
|
6085
6049
|
"textContent": "<% DATA.cellData || DATA.rowData.clusterName %>"
|
|
6086
6050
|
}
|
|
6087
6051
|
},
|
|
@@ -6145,7 +6109,8 @@
|
|
|
6145
6109
|
},
|
|
6146
6110
|
{
|
|
6147
6111
|
"description": {
|
|
6148
|
-
"title": "使用 flattenTreeDataListAndCalcRowSpan custom processor 平铺树形结构列表,并计算行合并"
|
|
6112
|
+
"title": "使用 flattenTreeDataListAndCalcRowSpan custom processor 平铺树形结构列表,并计算行合并",
|
|
6113
|
+
"message": "以上示例使用了 `PROCESSORS` 加工函数,具体可查看 [Custom Processors](/next-docs/docs/brick-next/custom-processors)"
|
|
6149
6114
|
},
|
|
6150
6115
|
"brick": "presentational-bricks.brick-table",
|
|
6151
6116
|
"properties": {
|
|
@@ -6185,9 +6150,25 @@
|
|
|
6185
6150
|
"en": "Basic",
|
|
6186
6151
|
"zh": "常用"
|
|
6187
6152
|
},
|
|
6188
|
-
"
|
|
6189
|
-
"en": "
|
|
6190
|
-
"zh": "
|
|
6153
|
+
"paginationAndFilter": {
|
|
6154
|
+
"en": "Pagination/Order/Filter",
|
|
6155
|
+
"zh": "分页/排序及搜索"
|
|
6156
|
+
},
|
|
6157
|
+
"expand": {
|
|
6158
|
+
"en": "Expand/Collapse",
|
|
6159
|
+
"zh": "展开/折叠"
|
|
6160
|
+
},
|
|
6161
|
+
"ui": {
|
|
6162
|
+
"en": "UI",
|
|
6163
|
+
"zh": "外观"
|
|
6164
|
+
},
|
|
6165
|
+
"rowSelection": {
|
|
6166
|
+
"en": "RowSelection",
|
|
6167
|
+
"zh": "行选择配置(rowSelection)"
|
|
6168
|
+
},
|
|
6169
|
+
"other": {
|
|
6170
|
+
"en": "其他",
|
|
6171
|
+
"zh": "other"
|
|
6191
6172
|
}
|
|
6192
6173
|
},
|
|
6193
6174
|
"author": "lynette",
|
|
@@ -6266,99 +6247,95 @@
|
|
|
6266
6247
|
"change": "新增 `shouldUpdateUrlParams` 属性和 `sort.update` 事件"
|
|
6267
6248
|
}
|
|
6268
6249
|
],
|
|
6269
|
-
"memo": "> Tips: 在 react 中,boolean 类型的值是合法的子元素,但是不会被渲染出来。如果希望 boolean 值在表格单元格中展示成 `true`|`false`,可以使用平台管道进行转换,例如`@{someProperties|string}`。更多场景下可以结合 [基本数值映射构件](developers/brick-book/brick/presentational-bricks.brick-value-mapping) 把 boolean 类型的值转换成有意义的文本进行展示。\n\n## dataSource 表格数据源\n| property | type | required | default | description |\n| ------------- | -------------- | -------- | ------- | -------------------------------------------------- |\n| dataSource | any | - | - | 数据源,通过 useResolves 从后台接口获取或者直接在 storyboard 中配置 |\n\n## columns 表格列配置\n| property | type | required | default | description |\n| ------------- | -------------- | -------- | ------- | -------------------------------------------------- |\n| columns | CustomColumn[] | - | - | 扩展自 ant-design 的 Column 相关配置项,具体查阅:[https://ant.design/components/table-cn/#Column](https://ant.design/components/table-cn/#Column) |\n\n### CustomColumn\n| property | type | required | default | description |\n| -------------------- | --------------------- | -------- | ------- | -------------------------------------------------------------- |\n| <del>component</del> | CustomColumnComponent | - | - | Deprecated。支持为某列自定义展示构件 |\n| valueSuffix | string | - | - | 字段的值展示时的后缀 |\n| useBrick | UseBrickConf | - | - | 支持为某列自定义展示构件 |\n| titleUseBrick | UseBrickConf | - | - | 支持为某列的标题自定义展示构件,可通过 DATA.title 获取标题文本 |\n| filters | {text:string,value:any}[] | - | - | 表头的筛选菜单项 |\n| verticalAlign | `top` | `bottom` | - | - | 单元格内元素的垂直对齐方式 |\n| colSpanKey | string | - | - | 每条记录的控制列合并的值的 key |\n| rowSpanKey | string | - | - | 每条记录的控制行合并的值的 key。如果希望将树形列表展平,并计算行合并的值,可以使用 flattenTreeDataListAndCalcRowSpan 自定义加工函数 |\n\n### UseBrickConf\n\n| property | type | required | default | description |\n| ------------- | -------------- | -------- | ------- | -------------------------------------------------- |\n| brick | string | ✔️ | - | 构件名称 |\n| properties | object | - | - | 构件属性 |\n| events | BrickEventsMap | - | - | 事件 |\n| transform | string\\|object | - | - | 属性数据转换 |\n| transformFrom | string | - | - | 属性数据转换来自数据源的哪个字段,不填则为整个数据 |\n\n`<presentational-bricks.brick-table>` 为某列自定义展示构件传递的数据源为:\n\n| field | type | description |\n| ----------- | ------ | ----------- |\n| cellData | any | 单元格数据 |\n| rowData | any | 整行数据 |\n| columnIndex | number | 列序号 |\n\n`<presentational-bricks.brick-table>` 为自定义行展开的构件传递的数据源为:\n\n| field | type | description |\n| -------- | ------ | ----------- |\n| rowData | any | 整行数据 |\n| rowIndex | number | 行序号 |\n\n### <del>CustomColumnComponent</del>\n\n<details>\n<summary>展开</summary>\n\n| property | type | required | default | description |\n| ---------- | -------------------------------------------- | -------- | ------- | ----------------------------------------------- |\n| brick | string | ✔️ | - | 构件名称 |\n| fields | {value: string; item: string; index: string} | ✔️ | - | 字段值、列表项和 index 对应所用构件的属性的 key |\n| properties | object | - | - | 构件属性 |\n| events | BrickEventsMap | - | - | 事件 |\n\n</details>\n\n### fields\n| property | type | required | default | description |\n| ---------- | ------ | -------- | -------- | -------------------------------------------------------------------------------------------------------- |\n| fields | fieldsType | - | - | 设置相关字段取自哪里,具体描述见下表 |\n\n### fieldsType\n| property | type | required | default | description |\n| ---------- | ------ | -------- | -------- | -------------------------------------------------------------------------------------------------------- |\n| dataSource | string | - | list | 指定 dataSource 从哪里来,默认为列表接口返回格式是{list:[],page:1,pageSize:10,total:20},即默认取自 list |\n| total | string | - | total | 指定 total 从哪里来,默认为列表接口返回格式是{list:[],page:1,pageSize:10,total:20},即默认取自 total |\n| page | string | - | page | 指定下表中 \"page.update\" 事件 detail 的 pagePath |\n| pageSize | string | - | pageSize | 指定下表 \"filter.update\" 事件 detail 的 pageSizePath |\n| ascend | string | - | ascend | 指定 ascend 升序排序对应字段,例如有些后台对应为 1 ,有些对应为 \"asc\"。这里默认为 \"ascend\" |\n| descend | string | - | descend | 指定 descend 降序排序对应字段,例如有些后台对应为 0 ,有些对应为 \"desc\"。这里默认为 \"descend\" |\n\n### pagination 默认配置\n\n如果不希望分页,只需在 storyboard 中如下设置即可:\n\n```\n{\n \"configProps\": {\n \"pagination\": false\n }\n}\n```\n\n如果希望覆盖默认配置,只需在 storyboard 中覆盖对应项即可,相关配置项具体查阅:<a href=\"https://ant.design/components/pagination-cn/#API\" target=\"_blank\">https://ant.design/components/pagination-cn/#API</a>:\n\n```\n{\n \"configProps\": {\n \"pagination\": {\n \"pageSizeOptions\": [\"10\",\"100\",\"1000\"]\n }\n }\n}\n```\n\n| property | type | required | default | description |\n| --------------- | -------- | -------- | ------------------ | ------------------------------------- |\n| current | string | - | - | 页码,从 page properties 获取 |\n| pageSize | string | - | - | 每页条数,从 pageSize properties 获取 |\n| total | object | - | - | 总数,从 dataSource.total 获取 |\n| showSizeChanger | boolean | - | true | 展示页码变化器 |\n| pageSizeOptions | array | - | [\"10\", \"20\", \"50\"] | 每页条数选项 |\n| showTotal | function | - | - | 渲染成\"共 xx 条\" |\n\n\n### rowSelection 默认配置\n\n行选择默认为 false,即如果不在 storyboard 中配置就不显示。如果要开启只需在 storyboard 中如下设置即可,这时 brick-table 会默认配置 onChange 事件:\n\n```\n{\n \"configProps\": {\n \"rowSelection\": true\n }\n}\n```\n\n如果希望覆盖或者扩展默认配置,只需在 storyboard 中覆盖对应项即可,相关配置项具体查阅:<a href=\"https://ant.design/components/table-cn/#rowSelection\" target=\"_blank\">https://ant.design/components/table-cn/#rowSelection</a>:\n\n```\n{\n \"configProps\": {\n \"rowSelection\": {\n \"columnWidth\": \"88px\"\n }\n }\n}\n```\n\n| property | type | required | default | description |\n| -------- | -------- | -------- | ------- | --------------------------------- |\n| onChange | function | - | - | 选择行,会抛出事件\"select.update\" |\n\n### 排序\n\n如果某一列希望排序,则可以设对应列 `sorter:true`,例如:\n\n```\n{\n \"columns\": [\n {\n \"title\": \"主机\",\n \"key\": \"hostname\",\n \"dataIndex\": \"hostname\",\n \"sorter\": true\n }\n ]\n}\n```\n\n## flattenTreeDataListAndCalcRowSpan 自定义加工函数\n\n将树形数据列表按照 `options.flattenConfigs` 进行展平,并生成相应的行合并数据\n\n### Params\n\n| param | type | required | default | description |\n| ------------ | ------------------------------------------ | -------- | ------- | ------------------------------------------------------------------------ |\n| treeDataList | `Record<string, unknown>[]` | ✔️ | - | 树形数据列表 |\n| options | `FlattenTreeDataListAndCalcRowSpanOptions` | ✔️ | - | 函数选项 |\n| depth | `number` | - | `0` | 当前展平的深度,用于确定 `options.flattenConfigs` 中的当前层级的展平配置 |\n\n### Returns\n\n| type | description |\n| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `Record<string, unknown>[]` | 展平后的列表,除了按照 `options.flattenConfigs` 进行展平外,还会生成相应层级以 `options.flattenConfigs[].parentInChildKey + \"RowSpan\"` 为 key 的行合并数据 |\n\n### FlattenTreeDataListAndCalcRowSpanOptions\n\n| property | type | required | default | description |\n| -------------------- | ----------------- | -------- | ------- | ---------------------------------------- |\n| flattenConfigs | `FlattenConfig[]` | ✔️ | - | 展平配置列表,按照由父到子的顺序一一对应 |\n| omitChildrenInParent | `boolean` | - | - | 展平后,是否省略父级里的子列表 |\n\n### FlattenConfig\n\n| property | type | required | default | description |\n| ---------------- | -------- | -------- | ------- | ------------------------ |\n| childrenKey | `string` | ✔️ | - | 对应层级子列表的 key |\n| parentInChildKey | `string` | ✔️ | - | 展平后,父级在子级的 key |",
|
|
6250
|
+
"memo": "> Tips: 在 react 中,boolean 类型的值是合法的子元素,但是不会被渲染出来。如果希望 boolean 值在表格单元格中展示成 `true`|`false`,可以使用平台管道进行转换,例如`@{someProperties|string}`。更多场景下可以结合 [基本数值映射构件](developers/brick-book/brick/presentational-bricks.brick-value-mapping) 把 boolean 类型的值转换成有意义的文本进行展示。\n### CustomColumn\n| property | type | required | default | description |\n| -------------------- | --------------------- | -------- | ------- | -------------------------------------------------------------- |\n| ~~component~~ | ~~CustomColumnComponent~~ | - | - | ~~ Deprecated。支持为某列自定义展示构件 ~~ |\n| valueSuffix | string | - | - | 字段的值展示时的后缀 |\n| useBrick | UseBrickConf | - | - | 支持为某列自定义展示构件, 具体查看 [UseBrickConf](/next-docs/docs/api-reference/brick-types.usesinglebrickconf) |\n| titleUseBrick | UseBrickConf | - | - | 支持为某列的标题自定义展示构件,可通过 DATA.title 获取标题文本,具体查看 [UseBrickConf](/next-docs/docs/api-reference/brick-types.usesinglebrickconf) |\n| filters | {text:string,value:any}[] | - | - | 表头的筛选菜单项 |\n| verticalAlign | top \\| bottom | - | - | 单元格内元素的垂直对齐方式 |\n| colSpanKey | string | - | - | 每条记录的控制列合并的值的 key |\n| rowSpanKey | string | - | - | 每条记录的控制行合并的值的 key。如果希望将树形列表展平,并计算行合并的值,可以使用 flattenTreeDataListAndCalcRowSpan 自定义加工函数 |\n\n### UseBrickConf\n\n| property | type | required | default | description |\n| ------------- | -------------- | -------- | ------- | -------------------------------------------------- |\n| brick | string | ✔️ | - | 构件名称 |\n| properties | object | - | - | 构件属性 |\n| events | BrickEventsMap | - | - | 事件 |\n| transform | string\\|object | - | - | 属性数据转换 |\n| transformFrom | string | - | - | 属性数据转换来自数据源的哪个字段,不填则为整个数据 |\n\n`<presentational-bricks.brick-table>` 为某列自定义展示构件传递的数据源为:\n\n| field | type | description |\n| ----------- | ------ | ----------- |\n| cellData | any | 单元格数据 |\n| rowData | any | 整行数据 |\n| columnIndex | number | 列序号 |\n\n`<presentational-bricks.brick-table>` 为自定义行展开的构件传递的数据源为:\n\n| field | type | description |\n| -------- | ------ | ----------- |\n| rowData | any | 整行数据 |\n| rowIndex | number | 行序号 |\n\n### <del>CustomColumnComponent</del>\n\n<details>\n<summary>展开</summary>\n\n| property | type | required | default | description |\n| ---------- | -------------------------------------------- | -------- | ------- | ----------------------------------------------- |\n| brick | string | ✔️ | - | 构件名称 |\n| fields | {value: string; item: string; index: string} | ✔️ | - | 字段值、列表项和 index 对应所用构件的属性的 key |\n| properties | object | - | - | 构件属性 |\n| events | BrickEventsMap | - | - | 事件 |\n\n</details>\n\n### fields\n| property | type | required | default | description |\n| ---------- | ------ | -------- | -------- | -------------------------------------------------------------------------------------------------------- |\n| fields | fieldsType | - | - | 设置相关字段取自哪里,具体描述见下表 |\n\n### fieldsType\n| property | type | required | default | description |\n| ---------- | ------ | -------- | -------- | -------------------------------------------------------------------------------------------------------- |\n| dataSource | string | - | list | 指定 dataSource 从哪里来,默认为列表接口返回格式是{list:[],page:1,pageSize:10,total:20},即默认取自 list |\n| total | string | - | total | 指定 total 从哪里来,默认为列表接口返回格式是{list:[],page:1,pageSize:10,total:20},即默认取自 total |\n| page | string | - | page | 指定下表中 \"page.update\" 事件 detail 的 pagePath |\n| pageSize | string | - | pageSize | 指定下表 \"filter.update\" 事件 detail 的 pageSizePath |\n| ascend | string | - | ascend | 指定 ascend 升序排序对应字段,例如有些后台对应为 1 ,有些对应为 \"asc\"。这里默认为 \"ascend\" |\n| descend | string | - | descend | 指定 descend 降序排序对应字段,例如有些后台对应为 0 ,有些对应为 \"desc\"。这里默认为 \"descend\" |\n\n### pagination 默认配置\n\n如果不希望分页,只需在 storyboard 中如下设置即可:\n\n```\n{\n \"configProps\": {\n \"pagination\": false\n }\n}\n```\n\n如果希望覆盖默认配置,只需在 storyboard 中覆盖对应项即可,相关配置项具体查阅:[pagination](https://ant.design/components/pagination-cn/#API)\n\n```\n{\n \"configProps\": {\n \"pagination\": {\n \"pageSizeOptions\": [\"10\",\"100\",\"1000\"]\n }\n }\n}\n```\n\n| property | type | required | default | description |\n| --------------- | -------- | -------- | ------------------ | ------------------------------------- |\n| current | string | - | - | 页码,从 page properties 获取 |\n| pageSize | string | - | - | 每页条数,从 pageSize properties 获取 |\n| total | object | - | - | 总数,从 dataSource.total 获取 |\n| showSizeChanger | boolean | - | true | 展示页码变化器 |\n| pageSizeOptions | array | - | [\"10\", \"20\", \"50\"] | 每页条数选项 |\n| showTotal | function | - | - | 渲染成\"共 xx 条\" |\n\n\n### rowSelection 默认配置\n\n行选择默认为 false,即如果不在 storyboard 中配置就不显示。如果要开启只需在 storyboard 中如下设置即可,这时 brick-table 会默认配置 onChange 事件:\n\n```\n{\n \"configProps\": {\n \"rowSelection\": true\n }\n}\n```\n\n如果希望覆盖或者扩展默认配置,只需在 storyboard 中覆盖对应项即可,相关配置项具体查阅:[rowSelection](https://ant.design/components/table-cn/#rowSelection)\n\n```\n{\n \"configProps\": {\n \"rowSelection\": {\n \"columnWidth\": \"88px\"\n }\n }\n}\n```\n\n| property | type | required | default | description |\n| -------- | -------- | -------- | ------- | --------------------------------- |\n| onChange | function | - | - | 选择行,会抛出事件\"select.update\" |\n\n### 排序\n\n如果某一列希望排序,则可以设对应列 `sorter:true`,例如:\n\n```\n{\n \"columns\": [\n {\n \"title\": \"主机\",\n \"key\": \"hostname\",\n \"dataIndex\": \"hostname\",\n \"sorter\": true\n }\n ]\n}\n```\n\n## flattenTreeDataListAndCalcRowSpan 自定义加工函数\n\n将树形数据列表按照 `options.flattenConfigs` 进行展平,并生成相应的行合并数据\n\n### Params\n\n| param | type | required | default | description |\n| ------------ | ------------------------------------------ | -------- | ------- | ------------------------------------------------------------------------ |\n| treeDataList | `Record<string, unknown>[]` | ✔️ | - | 树形数据列表 |\n| options | `FlattenTreeDataListAndCalcRowSpanOptions` | ✔️ | - | 函数选项 |\n| depth | `number` | - | 0 | 当前展平的深度,用于确定 `options.flattenConfigs` 中的当前层级的展平配置 |\n\n### Returns\n\n| type | description |\n| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `Record<string, unknown>[]` | 展平后的列表,除了按照 `options.flattenConfigs` 进行展平外,还会生成相应层级以 `options.flattenConfigs[].parentInChildKey + \"RowSpan\"` 为 key 的行合并数据 |\n\n### FlattenTreeDataListAndCalcRowSpanOptions\n\n| property | type | required | default | description |\n| -------------------- | ----------------- | -------- | ------- | ---------------------------------------- |\n| flattenConfigs | `FlattenConfig[]` | ✔️ | - | 展平配置列表,按照由父到子的顺序一一对应 |\n| omitChildrenInParent | `boolean` | - | - | 展平后,是否省略父级里的子列表 |\n\n### FlattenConfig\n\n| property | type | required | default | description |\n| ---------------- | -------- | -------- | ------- | ------------------------ |\n| childrenKey | `string` | ✔️ | - | 对应层级子列表的 key |\n| parentInChildKey | `string` | ✔️ | - | 展平后,父级在子级的 key |",
|
|
6270
6251
|
"properties": [
|
|
6271
6252
|
{
|
|
6272
6253
|
"name": "columns",
|
|
6273
6254
|
"type": "CustomColumn[]",
|
|
6274
6255
|
"required": "false",
|
|
6275
6256
|
"default": "-",
|
|
6276
|
-
"description": "扩展自 ant-design 的 Column
|
|
6257
|
+
"description": "扩展自 ant-design 的 Column 相关配置项,具体查阅:[Column](https://ant.design/components/table-cn/#Column)",
|
|
6258
|
+
"group": "basic"
|
|
6277
6259
|
},
|
|
6278
6260
|
{
|
|
6279
6261
|
"name": "dataSource",
|
|
6280
6262
|
"type": "any",
|
|
6281
6263
|
"required": "false",
|
|
6282
6264
|
"default": "-",
|
|
6283
|
-
"description": "数据源,通过 useResolves 从后台接口获取或者直接在 storyboard 中配置"
|
|
6265
|
+
"description": "数据源,通过 useResolves 从后台接口获取或者直接在 storyboard 中配置",
|
|
6266
|
+
"group": "basic"
|
|
6284
6267
|
},
|
|
6285
6268
|
{
|
|
6286
6269
|
"name": "rowKey",
|
|
6287
6270
|
"type": "string",
|
|
6288
6271
|
"required": "false",
|
|
6289
6272
|
"default": "-",
|
|
6290
|
-
"description": "指定每一行的 key,不指定则默认为索引 index。强烈建议设置该属性,否则在某些情况下可能行为不如预期。"
|
|
6273
|
+
"description": "指定每一行的 key,不指定则默认为索引 index。强烈建议设置该属性,否则在某些情况下可能行为不如预期。",
|
|
6274
|
+
"group": "basic"
|
|
6291
6275
|
},
|
|
6292
6276
|
{
|
|
6293
6277
|
"name": "hiddenColumns",
|
|
6294
6278
|
"type": "(string|number)[]",
|
|
6295
6279
|
"required": "false",
|
|
6296
6280
|
"default": "-",
|
|
6297
|
-
"description": "隐藏相应列(输入对应的 dataIndex 或者 key 即可)"
|
|
6298
|
-
|
|
6299
|
-
{
|
|
6300
|
-
"name": "shouldUpdateUrlParams",
|
|
6301
|
-
"type": "boolean",
|
|
6302
|
-
"required": "false",
|
|
6303
|
-
"default": "true",
|
|
6304
|
-
"description": "是否更新 url 参数。设置为否之后,如果是后台进行分页/排序等功能,则需要结合事件进行编排。如果是前台进行分页/排序,则不需要。"
|
|
6305
|
-
},
|
|
6306
|
-
{
|
|
6307
|
-
"name": "shouldRenderWhenUrlParamsUpdate",
|
|
6308
|
-
"type": "boolean",
|
|
6309
|
-
"required": "false",
|
|
6310
|
-
"default": "true",
|
|
6311
|
-
"description": "更新 url 参数时是否触发页面重新渲染。仅在`shouldUpdateUrlParams`为true时有效。"
|
|
6281
|
+
"description": "隐藏相应列(输入对应的 dataIndex 或者 key 即可)",
|
|
6282
|
+
"group": "basic"
|
|
6312
6283
|
},
|
|
6313
6284
|
{
|
|
6314
6285
|
"name": "showSelectInfo",
|
|
6315
6286
|
"type": "boolean",
|
|
6316
6287
|
"required": "false",
|
|
6317
|
-
"default": "
|
|
6318
|
-
"description": "是否显示已选择信息和清除按钮。仅在设置了`configProps.rowSelection`时有效。默认不显示"
|
|
6288
|
+
"default": "false",
|
|
6289
|
+
"description": "是否显示已选择信息和清除按钮。仅在设置了`configProps.rowSelection`时有效。默认不显示",
|
|
6290
|
+
"group": "rowSelection"
|
|
6319
6291
|
},
|
|
6320
6292
|
{
|
|
6321
6293
|
"name": "filters",
|
|
6322
6294
|
"type": "Record<string,string[]>",
|
|
6323
6295
|
"required": "false",
|
|
6324
6296
|
"default": "-",
|
|
6325
|
-
"description": "表头过滤的过滤项,key 为 column 的 dataIndex,value 为过滤值集合。"
|
|
6297
|
+
"description": "表头过滤的过滤项,key 为 column 的 dataIndex,value 为过滤值集合。",
|
|
6298
|
+
"group": "paginationAndFilter"
|
|
6326
6299
|
},
|
|
6327
6300
|
{
|
|
6328
6301
|
"name": "showCard",
|
|
6329
6302
|
"type": "boolean",
|
|
6330
6303
|
"required": "false",
|
|
6331
6304
|
"default": "true",
|
|
6332
|
-
"description": "是否显示外层卡片"
|
|
6305
|
+
"description": "是否显示外层卡片",
|
|
6306
|
+
"group": "ui"
|
|
6333
6307
|
},
|
|
6334
6308
|
{
|
|
6335
6309
|
"name": "configProps",
|
|
6336
6310
|
"type": "object",
|
|
6337
6311
|
"required": "false",
|
|
6338
6312
|
"default": "-",
|
|
6339
|
-
"description": "ant-design 的 Table 相关配置项,具体查阅:[
|
|
6340
|
-
"group": "
|
|
6313
|
+
"description": "ant-design 的 Table 相关配置项,具体查阅:[Table](https://ant.design/components/table-cn/#Table),其中分页配置和行选择配值在构件中设置了常用的默认配置,也可自行覆盖,具体描述见下表",
|
|
6314
|
+
"group": "other"
|
|
6341
6315
|
},
|
|
6342
6316
|
{
|
|
6343
6317
|
"name": "sort",
|
|
6344
6318
|
"type": "string",
|
|
6345
6319
|
"required": "false",
|
|
6346
6320
|
"default": "-",
|
|
6347
|
-
"description": "被排序列的 dataIndex。通常来自于 url 参数,可以设置成 ${QUERY.sort}。"
|
|
6321
|
+
"description": "被排序列的 dataIndex。通常来自于 url 参数,可以设置成 ${QUERY.sort}。",
|
|
6322
|
+
"group": "paginationAndFilter"
|
|
6348
6323
|
},
|
|
6349
6324
|
{
|
|
6350
6325
|
"name": "order",
|
|
6351
6326
|
"type": "string | number",
|
|
6352
6327
|
"required": "false",
|
|
6353
6328
|
"default": "-",
|
|
6354
|
-
"description": "升序/降序,可以设置成 ${QUERY.order}。"
|
|
6329
|
+
"description": "升序/降序,可以设置成 ${QUERY.order}。",
|
|
6330
|
+
"group": "paginationAndFilter"
|
|
6355
6331
|
},
|
|
6356
6332
|
{
|
|
6357
6333
|
"name": "rowDisabledConfig",
|
|
6358
6334
|
"type": "RowDisabledProps | RowDisabledProps[]",
|
|
6359
6335
|
"required": "false",
|
|
6360
6336
|
"default": "-",
|
|
6361
|
-
"description": "配置每一行是否禁用,其中 `field` 表示数据源中的字段路径, `value` 表示与其字段比较的值, `operator` 表示两者比较的方法,结果为 `true` 时会禁用当前行, 需要注意的是该配置需要在 `rowSelection: true` 的前提下使用,并且设置 `rowKey` 属性赋予每行唯一的 key,防止顺序变化时造成的错误勾选(如上 demo 所示)"
|
|
6337
|
+
"description": "配置每一行是否禁用,其中 `field` 表示数据源中的字段路径, `value` 表示与其字段比较的值, `operator` 表示两者比较的方法,结果为 `true` 时会禁用当前行, 需要注意的是该配置需要在 `rowSelection: true` 的前提下使用,并且设置 `rowKey` 属性赋予每行唯一的 key,防止顺序变化时造成的错误勾选(如上 demo 所示)",
|
|
6338
|
+
"group": "rowSelection"
|
|
6362
6339
|
},
|
|
6363
6340
|
{
|
|
6364
6341
|
"name": "expandedRowBrick",
|
|
@@ -6366,7 +6343,7 @@
|
|
|
6366
6343
|
"required": "false",
|
|
6367
6344
|
"default": "-",
|
|
6368
6345
|
"description": "自定义行展开的构件",
|
|
6369
|
-
"group": "
|
|
6346
|
+
"group": "expand"
|
|
6370
6347
|
},
|
|
6371
6348
|
{
|
|
6372
6349
|
"name": "expandIcon",
|
|
@@ -6374,7 +6351,7 @@
|
|
|
6374
6351
|
"required": "false",
|
|
6375
6352
|
"default": "{collapsedIcon:{lib:'antd',icon:'down',theme:'outlined'},expandedIcon:{lib:'antd',icon:'right',theme:'outlined'}}",
|
|
6376
6353
|
"description": "自定义展开图标。",
|
|
6377
|
-
"group": "
|
|
6354
|
+
"group": "expand"
|
|
6378
6355
|
},
|
|
6379
6356
|
{
|
|
6380
6357
|
"name": "expandIconAsCell",
|
|
@@ -6382,7 +6359,7 @@
|
|
|
6382
6359
|
"required": "false",
|
|
6383
6360
|
"default": "true",
|
|
6384
6361
|
"description": "展开的图标是否为一个单元格,默认显示在第一列;设置为 false 的时候,可以通过`expandIconColumnIndex`属性设置展开的图标在哪一列",
|
|
6385
|
-
"group": "
|
|
6362
|
+
"group": "expand"
|
|
6386
6363
|
},
|
|
6387
6364
|
{
|
|
6388
6365
|
"name": "expandIconColumnIndex",
|
|
@@ -6390,7 +6367,7 @@
|
|
|
6390
6367
|
"required": "false",
|
|
6391
6368
|
"default": "-",
|
|
6392
6369
|
"description": "展开的图标显示在哪一列,如果没有 rowSelection,默认显示在第一列,否则显示在选择框后面。当`expandIconAsCell`为 false 时,该属性生效。",
|
|
6393
|
-
"group": "
|
|
6370
|
+
"group": "expand"
|
|
6394
6371
|
},
|
|
6395
6372
|
{
|
|
6396
6373
|
"name": "expandRowByClick",
|
|
@@ -6398,7 +6375,7 @@
|
|
|
6398
6375
|
"required": "false",
|
|
6399
6376
|
"default": "false",
|
|
6400
6377
|
"description": "通过点击行来展开子行",
|
|
6401
|
-
"group": "
|
|
6378
|
+
"group": "expand"
|
|
6402
6379
|
},
|
|
6403
6380
|
{
|
|
6404
6381
|
"name": "optimizedColumns",
|
|
@@ -6406,7 +6383,7 @@
|
|
|
6406
6383
|
"required": "false",
|
|
6407
6384
|
"default": "-",
|
|
6408
6385
|
"description": "优化渲染的列(输入对应的 dataIndex),针对配置了 useBrick 的列。当前 antd 在更新 state 的时候,会全量渲染单元格,如果确定某一列在后续操作中不需要重新渲染,例如仅作为展示的单元格,可通过该属性设置以优化性能。注意,在树形表格中,当某一列内包含展开/收起按钮,则不应该设置该列。",
|
|
6409
|
-
"group": "
|
|
6386
|
+
"group": "basic"
|
|
6410
6387
|
},
|
|
6411
6388
|
{
|
|
6412
6389
|
"name": "wrapperConfig",
|
|
@@ -6414,7 +6391,7 @@
|
|
|
6414
6391
|
"default": "-",
|
|
6415
6392
|
"required": "false",
|
|
6416
6393
|
"description": "设置容器空状态时显示`empty`构件属性",
|
|
6417
|
-
"group": "
|
|
6394
|
+
"group": "ui"
|
|
6418
6395
|
},
|
|
6419
6396
|
{
|
|
6420
6397
|
"name": "stripEmptyExpandableChildren",
|
|
@@ -6422,7 +6399,7 @@
|
|
|
6422
6399
|
"required": "false",
|
|
6423
6400
|
"default": "false",
|
|
6424
6401
|
"description": "树形数据展示时是否需要去除空数组",
|
|
6425
|
-
"group": "
|
|
6402
|
+
"group": "expand"
|
|
6426
6403
|
},
|
|
6427
6404
|
{
|
|
6428
6405
|
"name": "defaultExpandAllRows",
|
|
@@ -6430,7 +6407,7 @@
|
|
|
6430
6407
|
"required": "false",
|
|
6431
6408
|
"default": "false",
|
|
6432
6409
|
"description": "初始时,是否展开所有行",
|
|
6433
|
-
"group": "
|
|
6410
|
+
"group": "expand"
|
|
6434
6411
|
},
|
|
6435
6412
|
{
|
|
6436
6413
|
"name": "expandedRowKeys",
|
|
@@ -6438,7 +6415,7 @@
|
|
|
6438
6415
|
"required": "false",
|
|
6439
6416
|
"default": "-",
|
|
6440
6417
|
"description": "展开的行的 rowKey",
|
|
6441
|
-
"group": "
|
|
6418
|
+
"group": "expand"
|
|
6442
6419
|
},
|
|
6443
6420
|
{
|
|
6444
6421
|
"name": "selectAllChildren",
|
|
@@ -6446,21 +6423,23 @@
|
|
|
6446
6423
|
"required": "false",
|
|
6447
6424
|
"default": "false",
|
|
6448
6425
|
"description": "表格树形数据展示的时候,行选择父节点的时候是否同步勾选/取消勾选所有子节点,并且被同步勾选的子节点不能单独取消。注意,该属性必须设置 `rowKey` 属性。",
|
|
6449
|
-
"group": "
|
|
6426
|
+
"group": "expand"
|
|
6450
6427
|
},
|
|
6451
6428
|
{
|
|
6452
6429
|
"name": "defaultSelectAll",
|
|
6453
6430
|
"type": "boolean",
|
|
6454
6431
|
"required": "false",
|
|
6455
6432
|
"default": "false",
|
|
6456
|
-
"description": "是否默认选择所有行。注意,该属性必须设置 `rowKey` 属性。"
|
|
6433
|
+
"description": "是否默认选择所有行。注意,该属性必须设置 `rowKey` 属性。",
|
|
6434
|
+
"group": "expand"
|
|
6457
6435
|
},
|
|
6458
6436
|
{
|
|
6459
6437
|
"name": "ellipsisInfo",
|
|
6460
6438
|
"type": "boolean",
|
|
6461
6439
|
"required": "false",
|
|
6462
|
-
"default": "
|
|
6463
|
-
"description": "是否显示省略信息"
|
|
6440
|
+
"default": "false",
|
|
6441
|
+
"description": "是否显示省略信息",
|
|
6442
|
+
"group": "basic"
|
|
6464
6443
|
},
|
|
6465
6444
|
{
|
|
6466
6445
|
"name": "childrenColumnName",
|
|
@@ -6468,14 +6447,15 @@
|
|
|
6468
6447
|
"required": "false",
|
|
6469
6448
|
"default": "children",
|
|
6470
6449
|
"description": "指定树形结构的列名",
|
|
6471
|
-
"group": "
|
|
6450
|
+
"group": "expand"
|
|
6472
6451
|
},
|
|
6473
6452
|
{
|
|
6474
6453
|
"name": "sortable",
|
|
6475
6454
|
"type": "boolean",
|
|
6476
6455
|
"required": "false",
|
|
6477
6456
|
"default": "true",
|
|
6478
|
-
"description": "是否支持排序。默认开启,当对应列的sorter设置成true时则可排序。sortable为false时则排序都不生效。"
|
|
6457
|
+
"description": "是否支持排序。默认开启,当对应列的sorter设置成true时则可排序。sortable为false时则排序都不生效。",
|
|
6458
|
+
"group": "paginationAndFilter"
|
|
6479
6459
|
},
|
|
6480
6460
|
{
|
|
6481
6461
|
"name": "fields",
|
|
@@ -6483,71 +6463,79 @@
|
|
|
6483
6463
|
"required": "false",
|
|
6484
6464
|
"default": "-",
|
|
6485
6465
|
"description": "设置相关字段取自哪里,具体描述见下表",
|
|
6486
|
-
"group": "
|
|
6466
|
+
"group": "basic"
|
|
6487
6467
|
},
|
|
6488
6468
|
{
|
|
6489
6469
|
"name": "frontSearch",
|
|
6490
6470
|
"type": "boolean",
|
|
6491
6471
|
"required": "false",
|
|
6492
6472
|
"default": "false",
|
|
6493
|
-
"description": "是否前端进行搜索,配合`presentational-bricks.brick-input`使用"
|
|
6473
|
+
"description": "是否前端进行搜索,配合`presentational-bricks.brick-input`使用",
|
|
6474
|
+
"group": "paginationAndFilter"
|
|
6494
6475
|
},
|
|
6495
6476
|
{
|
|
6496
6477
|
"name": "frontSearchQuery",
|
|
6497
6478
|
"type": "string",
|
|
6498
6479
|
"required": "false",
|
|
6499
6480
|
"default": "-",
|
|
6500
|
-
"description": "前端搜索参数"
|
|
6481
|
+
"description": "前端搜索参数",
|
|
6482
|
+
"group": "paginationAndFilter"
|
|
6501
6483
|
},
|
|
6502
6484
|
{
|
|
6503
6485
|
"name": "exactSearch",
|
|
6504
6486
|
"type": "boolean",
|
|
6505
6487
|
"required": "false",
|
|
6506
6488
|
"default": "false",
|
|
6507
|
-
"description": "是否精确搜索"
|
|
6489
|
+
"description": "是否精确搜索",
|
|
6490
|
+
"group": "paginationAndFilter"
|
|
6508
6491
|
},
|
|
6509
6492
|
{
|
|
6510
6493
|
"name": "frontSearchFilterKeys",
|
|
6511
6494
|
"type": "string[]",
|
|
6512
6495
|
"required": "false",
|
|
6513
6496
|
"default": "-",
|
|
6514
|
-
"description": "进行前端搜索的字段,支持嵌套的写法如[\"name\",\"value.a\"],不配置的时候默认为对所有 columns 的 dataIndex[]进行前端搜索"
|
|
6497
|
+
"description": "进行前端搜索的字段,支持嵌套的写法如[\"name\",\"value.a\"],不配置的时候默认为对所有 columns 的 dataIndex[]进行前端搜索",
|
|
6498
|
+
"group": "paginationAndFilter"
|
|
6515
6499
|
},
|
|
6516
6500
|
{
|
|
6517
6501
|
"name": "page",
|
|
6518
6502
|
"type": "number",
|
|
6519
6503
|
"required": "false",
|
|
6520
6504
|
"default": "-",
|
|
6521
|
-
"description": "页码。后台搜索的时候一般不需要配置,列表接口返回格式通常为{list:[],page:1,pageSize:10,total:20},即默认取自 page;前台搜索的时候,一般配置成 \"${query.page=1|number}\""
|
|
6505
|
+
"description": "页码。后台搜索的时候一般不需要配置,列表接口返回格式通常为{list:[],page:1,pageSize:10,total:20},即默认取自 page;前台搜索的时候,一般配置成 \"${query.page=1|number}\"",
|
|
6506
|
+
"group": "paginationAndFilter"
|
|
6522
6507
|
},
|
|
6523
6508
|
{
|
|
6524
6509
|
"name": "pageSize",
|
|
6525
6510
|
"type": "number",
|
|
6526
6511
|
"required": "false",
|
|
6527
6512
|
"default": "-",
|
|
6528
|
-
"description": "页码条数。后台搜索的时候一般不需要配置,列表接口返回格式通常为{list:[],page:1,pageSize:10,total:20},即默认取自 pageSize/page_size;前台搜索的时候,一般配置成 \"${query.pageSize=10|number}\""
|
|
6513
|
+
"description": "页码条数。后台搜索的时候一般不需要配置,列表接口返回格式通常为{list:[],page:1,pageSize:10,total:20},即默认取自 pageSize/page_size;前台搜索的时候,一般配置成 \"${query.pageSize=10|number}\"",
|
|
6514
|
+
"group": "paginationAndFilter"
|
|
6529
6515
|
},
|
|
6530
6516
|
{
|
|
6531
6517
|
"name": "scrollConfigs",
|
|
6532
6518
|
"type": "{\n x?: string | number | true;\n y?: number | string;\n} & {\n scrollToFirstRowOnChange?: boolean;\n}",
|
|
6533
6519
|
"required": "false",
|
|
6534
6520
|
"default": "{ x: true }",
|
|
6535
|
-
"description": "表格是否可滚动,也可以指定滚动区域的宽、高,配置项。详见 https://ant.design/components/table-cn/#scroll",
|
|
6536
|
-
"group": "
|
|
6521
|
+
"description": "表格是否可滚动,也可以指定滚动区域的宽、高,配置项。详见 [scroll](https://ant.design/components/table-cn/#scroll)",
|
|
6522
|
+
"group": "other"
|
|
6537
6523
|
},
|
|
6538
6524
|
{
|
|
6539
6525
|
"name": "qField",
|
|
6540
6526
|
"type": "string",
|
|
6541
6527
|
"required": "false",
|
|
6542
6528
|
"default": "\"q\"",
|
|
6543
|
-
"description": "把过滤条件更新到 url 时的字段名"
|
|
6529
|
+
"description": "把过滤条件更新到 url 时的字段名",
|
|
6530
|
+
"group": "paginationAndFilter"
|
|
6544
6531
|
},
|
|
6545
6532
|
{
|
|
6546
6533
|
"name": "tableDraggable",
|
|
6547
6534
|
"type": "boolean",
|
|
6548
6535
|
"required": "false",
|
|
6549
6536
|
"default": "false",
|
|
6550
|
-
"description": "表格行是否可拖拽,注意,树形数据的表格不支持该功能"
|
|
6537
|
+
"description": "表格行是否可拖拽,注意,树形数据的表格不支持该功能",
|
|
6538
|
+
"group": "basic"
|
|
6551
6539
|
},
|
|
6552
6540
|
{
|
|
6553
6541
|
"name": "zebraPattern",
|
|
@@ -6555,7 +6543,7 @@
|
|
|
6555
6543
|
"required": "false",
|
|
6556
6544
|
"default": "false",
|
|
6557
6545
|
"description": "是否展示斑马纹",
|
|
6558
|
-
"group": "
|
|
6546
|
+
"group": "ui"
|
|
6559
6547
|
},
|
|
6560
6548
|
{
|
|
6561
6549
|
"name": "storeCheckedByUrl",
|
|
@@ -6563,6 +6551,14 @@
|
|
|
6563
6551
|
"required": "false",
|
|
6564
6552
|
"default": "false",
|
|
6565
6553
|
"description": "翻页时是否记住之前选中的项。注意,选中项的rowKey将保存在url中,如果不设置rowKey,该设置不生效。如果选择太多可能会造成url过长,请谨慎使用",
|
|
6554
|
+
"group": "other"
|
|
6555
|
+
},
|
|
6556
|
+
{
|
|
6557
|
+
"name": "extraRows",
|
|
6558
|
+
"type": "Record<string, unknown>[]",
|
|
6559
|
+
"required": "false",
|
|
6560
|
+
"default": "-",
|
|
6561
|
+
"description": "额外的行,通常为跨页勾选时,不在当前页的行",
|
|
6566
6562
|
"group": "advanced"
|
|
6567
6563
|
},
|
|
6568
6564
|
{
|
|
@@ -6571,7 +6567,7 @@
|
|
|
6571
6567
|
"required": "false",
|
|
6572
6568
|
"default": "false",
|
|
6573
6569
|
"description": "[已废弃]请用 tableDraggable 代替",
|
|
6574
|
-
"group": "
|
|
6570
|
+
"group": "other"
|
|
6575
6571
|
},
|
|
6576
6572
|
{
|
|
6577
6573
|
"name": "autoSelectParentWhenAllChildrenSelected",
|
|
@@ -6579,49 +6575,78 @@
|
|
|
6579
6575
|
"required": "false",
|
|
6580
6576
|
"default": "false",
|
|
6581
6577
|
"description": "当所有子节点选中时,自动选中父节点",
|
|
6582
|
-
"group": "
|
|
6578
|
+
"group": "expand"
|
|
6583
6579
|
},
|
|
6584
6580
|
{
|
|
6585
6581
|
"name": "thTransparent",
|
|
6586
6582
|
"type": "boolean",
|
|
6587
6583
|
"required": "-",
|
|
6588
6584
|
"default": "-",
|
|
6589
|
-
"description": "表格表头是否透明"
|
|
6585
|
+
"description": "表格表头是否透明",
|
|
6586
|
+
"group": "ui"
|
|
6590
6587
|
},
|
|
6591
6588
|
{
|
|
6592
6589
|
"name": "showHeader",
|
|
6593
6590
|
"type": "boolean",
|
|
6594
6591
|
"required": "false",
|
|
6595
6592
|
"default": "true",
|
|
6596
|
-
"description": "是否显示表头"
|
|
6593
|
+
"description": "是否显示表头",
|
|
6594
|
+
"group": "ui"
|
|
6597
6595
|
},
|
|
6598
6596
|
{
|
|
6599
6597
|
"name": "pagination",
|
|
6600
6598
|
"type": "false | TablePaginationConfig",
|
|
6601
6599
|
"required": "false",
|
|
6602
6600
|
"default": "-",
|
|
6603
|
-
"description": "
|
|
6601
|
+
"description": "是否显示分页",
|
|
6602
|
+
"group": "paginationAndFilter"
|
|
6603
|
+
},
|
|
6604
|
+
{
|
|
6605
|
+
"name": "rowSelection",
|
|
6606
|
+
"type": "false | TableRowSelection",
|
|
6607
|
+
"required": "false",
|
|
6608
|
+
"default": "-",
|
|
6609
|
+
"description": "表格行是否可选择,优先级低于configProps.rowSelection,具体查阅:[https://ant.design/components/table-cn/#rowSelection]"
|
|
6604
6610
|
},
|
|
6605
6611
|
{
|
|
6606
6612
|
"name": "size",
|
|
6607
6613
|
"type": "SizeType",
|
|
6608
6614
|
"required": "false",
|
|
6609
6615
|
"default": "-",
|
|
6610
|
-
"description": "表格大小(antd原生size
|
|
6616
|
+
"description": "表格大小(antd原生size)",
|
|
6617
|
+
"group": "ui"
|
|
6611
6618
|
},
|
|
6612
6619
|
{
|
|
6613
6620
|
"name": "type",
|
|
6614
6621
|
"type": "RowSelectionType",
|
|
6615
6622
|
"required": "false",
|
|
6616
6623
|
"default": "-",
|
|
6617
|
-
"description": "
|
|
6624
|
+
"description": "选框类型(单选/多选)",
|
|
6625
|
+
"group": "rowSelection"
|
|
6626
|
+
},
|
|
6627
|
+
{
|
|
6628
|
+
"name": "shouldUpdateUrlParams",
|
|
6629
|
+
"type": "boolean",
|
|
6630
|
+
"required": "false",
|
|
6631
|
+
"default": "true",
|
|
6632
|
+
"description": "是否更新 url 参数。设置为否之后,如果是后台进行分页/排序等功能,则需要结合事件进行编排。如果是前台进行分页/排序,则不需要。",
|
|
6633
|
+
"group": "other"
|
|
6634
|
+
},
|
|
6635
|
+
{
|
|
6636
|
+
"name": "shouldRenderWhenUrlParamsUpdate",
|
|
6637
|
+
"type": "boolean",
|
|
6638
|
+
"required": "false",
|
|
6639
|
+
"default": "true",
|
|
6640
|
+
"description": "更新 url 参数时是否触发页面重新渲染。仅在`shouldUpdateUrlParams`为true时有效。",
|
|
6641
|
+
"group": "other"
|
|
6618
6642
|
},
|
|
6619
6643
|
{
|
|
6620
6644
|
"name": "selectedRowKeys",
|
|
6621
6645
|
"type": "React.Key[]",
|
|
6622
6646
|
"default": "[]",
|
|
6623
6647
|
"required": "false",
|
|
6624
|
-
"description": "指定选中项的 key 数组"
|
|
6648
|
+
"description": "指定选中项的 key 数组",
|
|
6649
|
+
"group": "rowSelection"
|
|
6625
6650
|
}
|
|
6626
6651
|
],
|
|
6627
6652
|
"events": [
|
|
@@ -6665,6 +6690,10 @@
|
|
|
6665
6690
|
{
|
|
6666
6691
|
"name": "expandAll",
|
|
6667
6692
|
"description": "展开所有行"
|
|
6693
|
+
},
|
|
6694
|
+
{
|
|
6695
|
+
"name": "filterSourceData",
|
|
6696
|
+
"description": "搜索过滤"
|
|
6668
6697
|
}
|
|
6669
6698
|
],
|
|
6670
6699
|
"interface": [
|