@next-bricks/advanced 0.50.0 → 0.50.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/bricks.json +11 -11
  2. package/dist/chunks/{4837.252e0a15.js → 4837.efaf868f.js} +2 -2
  3. package/dist/chunks/{4837.252e0a15.js.map → 4837.efaf868f.js.map} +1 -1
  4. package/dist/chunks/{7218.a0df7078.js → 7218.27d24f55.js} +2 -2
  5. package/dist/chunks/{7218.a0df7078.js.map → 7218.27d24f55.js.map} +1 -1
  6. package/dist/chunks/{8382.6a118a39.js → 8382.6dfa8bbf.js} +2 -2
  7. package/dist/chunks/{8382.6a118a39.js.map → 8382.6dfa8bbf.js.map} +1 -1
  8. package/dist/chunks/{9118.2a6000ef.js → 9118.5b3f23c5.js} +3 -3
  9. package/dist/chunks/{9118.2a6000ef.js.map → 9118.5b3f23c5.js.map} +1 -1
  10. package/dist/chunks/948.cc530ed3.js +3 -0
  11. package/dist/chunks/948.cc530ed3.js.map +1 -0
  12. package/dist/chunks/{capture-snapshot.27f1b5a0.js → capture-snapshot.8f6e201d.js} +2 -2
  13. package/dist/chunks/{capture-snapshot.27f1b5a0.js.map → capture-snapshot.8f6e201d.js.map} +1 -1
  14. package/dist/chunks/{eo-cascader.b540372d.js → eo-cascader.f15962bc.js} +2 -2
  15. package/dist/chunks/{eo-cascader.b540372d.js.map → eo-cascader.f15962bc.js.map} +1 -1
  16. package/dist/chunks/{eo-next-table.337e35dc.js → eo-next-table.3785b3cf.js} +2 -2
  17. package/dist/chunks/{eo-next-table.337e35dc.js.map → eo-next-table.3785b3cf.js.map} +1 -1
  18. package/dist/chunks/{eo-table.65cb5fd5.js → eo-table.81f03d81.js} +2 -2
  19. package/dist/chunks/{eo-table.65cb5fd5.js.map → eo-table.81f03d81.js.map} +1 -1
  20. package/dist/chunks/{eo-tree-select.bf621207.js → eo-tree-select.b56998a8.js} +2 -2
  21. package/dist/chunks/{eo-tree-select.bf621207.js.map → eo-tree-select.b56998a8.js.map} +1 -1
  22. package/dist/chunks/{eo-tree.eaa6decf.js → eo-tree.09821737.js} +3 -3
  23. package/dist/chunks/{eo-tree.eaa6decf.js.map → eo-tree.09821737.js.map} +1 -1
  24. package/dist/chunks/{eo-workbench-layout-v2.849c18b3.js → eo-workbench-layout-v2.b3461c69.js} +3 -3
  25. package/dist/chunks/{eo-workbench-layout-v2.849c18b3.js.map → eo-workbench-layout-v2.b3461c69.js.map} +1 -1
  26. package/dist/chunks/{eo-workbench-layout.ccd7ef3e.js → eo-workbench-layout.ec167db5.js} +2 -2
  27. package/dist/chunks/{eo-workbench-layout.ccd7ef3e.js.map → eo-workbench-layout.ec167db5.js.map} +1 -1
  28. package/dist/chunks/main.68fe3e9b.js +2 -0
  29. package/dist/chunks/{main.6c8ad570.js.map → main.68fe3e9b.js.map} +1 -1
  30. package/dist/examples.json +3 -3
  31. package/dist/index.b81c4f94.js +2 -0
  32. package/dist/{index.1ce56ab2.js.map → index.b81c4f94.js.map} +1 -1
  33. package/dist/manifest.json +338 -338
  34. package/package.json +2 -2
  35. package/dist/chunks/948.0d1d643b.js +0 -3
  36. package/dist/chunks/948.0d1d643b.js.map +0 -1
  37. package/dist/chunks/main.6c8ad570.js +0 -2
  38. package/dist/index.1ce56ab2.js +0 -2
  39. /package/dist/chunks/{9118.2a6000ef.js.LICENSE.txt → 9118.5b3f23c5.js.LICENSE.txt} +0 -0
  40. /package/dist/chunks/{948.0d1d643b.js.LICENSE.txt → 948.cc530ed3.js.LICENSE.txt} +0 -0
  41. /package/dist/chunks/{eo-tree.eaa6decf.js.LICENSE.txt → eo-tree.09821737.js.LICENSE.txt} +0 -0
  42. /package/dist/chunks/{eo-workbench-layout-v2.849c18b3.js.LICENSE.txt → eo-workbench-layout-v2.b3461c69.js.LICENSE.txt} +0 -0
@@ -4,345 +4,226 @@
4
4
  "name": "advanced",
5
5
  "bricks": [
6
6
  {
7
- "name": "eo-table",
8
- "alias": [
9
- "advanced.general-table"
10
- ],
7
+ "name": "eo-next-table",
11
8
  "properties": [
12
- {
13
- "name": "showCard",
14
- "description": "是否显示外层卡片",
15
- "default": "true"
16
- },
17
- {
18
- "name": "rowSelection",
19
- "description": "表格行是否可选择,具体查阅:[rowSelection](https://ant.design/components/table-cn/#rowSelection)",
20
- "attribute": false,
21
- "type": "false | TableRowSelection<any>"
22
- },
23
9
  {
24
10
  "name": "rowKey",
25
- "description": "指定每一行的 key,不指定则默认为索引 index。强烈建议设置该属性,否则在某些情况下可能行为不如预期。",
11
+ "description": "指定表格行的 key",
12
+ "default": "\"key\"",
26
13
  "type": "string"
27
14
  },
28
15
  {
29
- "name": "hiddenColumns",
30
- "description": "隐藏相应列(输入对应的 dataIndex 或者 key 即可)",
31
- "attribute": false,
32
- "type": "Array<string | number>"
33
- },
34
- {
35
- "name": "showSelectInfo",
36
- "description": "是否显示已选择信息和清除按钮。仅在设置了`rowSelection`时有效。默认不显示",
37
- "default": "false"
38
- },
39
- {
40
- "name": "filters",
41
- "description": "表头过滤的过滤项,key 为 column 的 dataIndex,value 为过滤值集合。",
42
- "attribute": false,
43
- "type": "Record<string, string[]>"
44
- },
45
- {
46
- "name": "configProps",
47
- "description": "ant-design 的 Table 相关配置项,具体查阅:[Table](https://ant.design/components/table-cn/#Table),其中分页配置和行选择配值在构件中设置了常用的默认配置,也可自行覆盖,具体描述见下表",
48
- "attribute": false,
49
- "type": "any"
50
- },
51
- {
52
- "name": "sort",
53
- "description": "被排序列的 dataIndex。通常来自于 url 参数,可以设置成 ${QUERY.sort}。",
54
- "type": "string | null"
55
- },
56
- {
57
- "name": "order",
58
- "description": "升序/降序,可以设置成 ${QUERY.order}。",
59
- "attribute": false,
60
- "type": "string | number | null"
61
- },
62
- {
63
- "name": "rowDisabledConfig",
64
- "description": "配置每一行是否禁用,其中 `field` 表示数据源中的字段路径, `value` 表示与其字段比较的值, `operator` 表示两者比较的方法,结果为 `true` 时会禁用当前行, 需要注意的是该配置需要在 `rowSelection: true` 的前提下使用,并且设置 `rowKey` 属性赋予每行唯一的 key,防止顺序变化时造成的错误勾选(如上 demo 所示)",
16
+ "name": "columns",
17
+ "description": "列定义",
65
18
  "attribute": false,
66
- "type": "RowDisabledProps | RowDisabledProps[]"
19
+ "type": "Column[]"
67
20
  },
68
21
  {
69
- "name": "expandedRowBrick",
70
- "description": "自定义行展开的构件 [UseBrickConf](/next-docs/docs/api-reference/brick-types.usesinglebrickconf)",
22
+ "name": "cell",
23
+ "description": "单元格",
71
24
  "attribute": false,
72
- "type": "{\n useBrick?: UseSingleBrickConf;\n }"
25
+ "type": "CellConfig"
73
26
  },
74
27
  {
75
- "name": "expandIcon",
76
- "description": "自定义展开图标。",
77
- "default": "{collapsedIcon:{lib:'antd',icon:'down',theme:'outlined'},expandedIcon:{lib:'antd',icon:'right',theme:'outlined'}}",
28
+ "name": "dataSource",
29
+ "description": "数据源",
78
30
  "attribute": false,
79
- "type": "{\n collapsedIcon: GeneralIconProps;\n expandedIcon: GeneralIconProps;\n }"
80
- },
81
- {
82
- "name": "expandIconAsCell",
83
- "description": "展开的图标是否为一个单元格,默认显示在第一列;设置为 false 的时候,可以通过`expandIconColumnIndex`属性设置展开的图标在哪一列",
84
- "default": "true",
85
- "attribute": false
86
- },
87
- {
88
- "name": "expandIconColumnIndex",
89
- "description": "展开的图标显示在哪一列,如果没有 rowSelection,默认显示在第一列,否则显示在选择框后面。当`expandIconAsCell`为 false 时,该属性生效。",
90
- "type": "number"
31
+ "type": "DataSource"
91
32
  },
92
33
  {
93
- "name": "expandRowByClick",
94
- "description": "通过点击行来展开子行",
34
+ "name": "frontSearch",
35
+ "description": "是否前端搜索",
95
36
  "type": "boolean"
96
37
  },
97
38
  {
98
- "name": "optimizedColumns",
99
- "description": "优化渲染的列(输入对应的 dataIndex),针对配置了 useBrick 的列。当前 antd 在更新 state 的时候,会全量渲染单元格,如果确定某一列在后续操作中不需要重新渲染,例如仅作为展示的单元格,可通过该属性设置以优化性能。注意,在树形表格中,当某一列内包含展开/收起按钮,则不应该设置该列。",
39
+ "name": "pagination",
40
+ "description": "分页配置",
100
41
  "attribute": false,
101
- "type": "Array<string | number>"
102
- },
103
- {
104
- "name": "stripEmptyExpandableChildren",
105
- "description": "树形数据展示时是否需要去除空数组",
106
- "default": "false",
107
- "attribute": false
42
+ "type": "PaginationType"
108
43
  },
109
44
  {
110
- "name": "defaultExpandAllRows",
111
- "description": "初始时,是否展开所有行",
45
+ "name": "loading",
46
+ "description": "显示加载中状态",
112
47
  "type": "boolean"
113
48
  },
114
49
  {
115
- "name": "ellipsisInfo",
116
- "description": "是否显示省略信息",
50
+ "name": "multiSort",
51
+ "description": "是否支持多列排序,前端搜索时需设置 column.sortPriority 优先级",
117
52
  "type": "boolean"
118
53
  },
119
54
  {
120
- "name": "expandedRowKeys",
121
- "description": "展开的行的 rowKey",
55
+ "name": "sort",
56
+ "description": "排序信息",
122
57
  "attribute": false,
123
- "type": "string[]"
124
- },
125
- {
126
- "name": "selectAllChildren",
127
- "description": "表格树形数据展示的时候,行选择父节点的时候是否同步勾选/取消勾选所有子节点,并且被同步勾选的子节点不能单独取消。注意,该属性必须设置 `rowKey` 属性。",
128
- "type": "boolean"
129
- },
130
- {
131
- "name": "defaultSelectAll",
132
- "description": "是否默认选择所有行。注意,该属性必须设置 `rowKey` 属性。",
133
- "type": "boolean"
134
- },
135
- {
136
- "name": "childrenColumnName",
137
- "description": "指定树形结构的列名",
138
- "default": "children",
139
- "attribute": false
140
- },
141
- {
142
- "name": "sortable",
143
- "description": "是否支持排序。默认开启,当对应列的sorter设置成true时则可排序。sortable为false时则排序都不生效。",
144
- "default": "true",
145
- "attribute": false
146
- },
147
- {
148
- "name": "frontSearch",
149
- "description": "是否前端进行搜索,配合`presentational-bricks.brick-input`使用",
150
- "type": "boolean"
151
- },
152
- {
153
- "name": "frontSearchQuery",
154
- "description": "前端搜索参数",
155
- "default": "\"\""
156
- },
157
- {
158
- "name": "exactSearch",
159
- "description": "是否精确搜索",
160
- "type": "boolean"
58
+ "type": "Sort | Sort[]"
161
59
  },
162
60
  {
163
- "name": "frontSearchFilterKeys",
164
- "description": "进行前端搜索的字段,支持嵌套的写法如[\"name\",\"value.a\"],不配置的时候默认为对所有 columns 的 dataIndex[]进行前端搜索",
61
+ "name": "rowSelection",
62
+ "description": "表格行可选择配置",
165
63
  "attribute": false,
166
- "type": "string[]"
167
- },
168
- {
169
- "name": "page",
170
- "description": "页码。后台搜索的时候一般不需要配置,列表接口返回格式通常为{list:[],page:1,pageSize:10,total:20},即默认取自 page;前台搜索的时候,一般配置成 \"${query.page=1|number}\"",
171
- "type": "number"
64
+ "type": "RowSelectionType"
172
65
  },
173
66
  {
174
- "name": "pageSize",
175
- "description": "页码条数。后台搜索的时候一般不需要配置,列表接口返回格式通常为{list:[],page:1,pageSize:10,total:20},即默认取自 pageSize/page_size;前台搜索的时候,一般配置成 \"${query.pageSize=10|number}\"",
176
- "type": "number"
67
+ "name": "selectedRowKeys",
68
+ "description": "选中项的 key",
69
+ "attribute": false,
70
+ "type": "(string | number)[]"
177
71
  },
178
72
  {
179
- "name": "scrollConfigs",
180
- "description": "",
181
- "default": "{ x: true }",
73
+ "name": "hiddenColumns",
74
+ "description": "隐藏的列(输入对应的 column.key)",
182
75
  "attribute": false,
183
- "type": "TableProps<unknown>[\"scroll\"]"
76
+ "type": "(string | number)[]"
184
77
  },
185
78
  {
186
- "name": "qField",
187
- "description": "把过滤条件更新到 url 时的字段名",
188
- "default": "\"q\""
79
+ "name": "expandable",
80
+ "description": "表格行展开配置",
81
+ "attribute": false,
82
+ "type": "ExpandableType"
189
83
  },
190
84
  {
191
- "name": "tableDraggable",
192
- "description": "表格行是否可拖拽,注意,树形数据的表格不支持该功能",
193
- "type": "boolean"
85
+ "name": "expandedRowKeys",
86
+ "description": "展开项的 key",
87
+ "attribute": false,
88
+ "type": "(string | number)[]"
194
89
  },
195
90
  {
196
- "name": "zebraPattern",
197
- "description": "是否展示斑马纹",
198
- "type": "boolean"
91
+ "name": "childrenColumnName",
92
+ "description": "树形结构的列名",
93
+ "default": "\"children\"",
94
+ "type": "string"
199
95
  },
200
96
  {
201
- "name": "storeCheckedByUrl",
202
- "description": "翻页时是否记住之前选中的项。注意,选中项的rowKey将保存在url中,如果不设置rowKey,该设置不生效。如果选择太多可能会造成url过长,请谨慎使用",
97
+ "name": "rowDraggable",
98
+ "description": "表格行拖拽配置",
203
99
  "type": "boolean"
204
100
  },
205
101
  {
206
- "name": "extraRows",
207
- "description": "额外的行,通常为跨页勾选时,不在当前页的行",
208
- "default": "[]",
102
+ "name": "searchFields",
103
+ "description": "进行前端搜索的字段,支持嵌套的写法。不配置的时候默认为对所有 column.dataIndex 进行前端搜索",
209
104
  "attribute": false,
210
- "type": "Record<string, unknown>[]"
211
- },
212
- {
213
- "name": "autoSelectParentWhenAllChildrenSelected",
214
- "description": "当所有子节点选中时,自动选中父节点",
215
- "type": "boolean"
105
+ "type": "(string | string[])[]"
216
106
  },
217
107
  {
218
- "name": "thTransparent",
219
- "description": "表格表头是否透明",
220
- "type": "boolean"
108
+ "name": "size",
109
+ "description": "表格大小",
110
+ "default": "\"large\"",
111
+ "type": "TableProps<RecordType>[\"size\"]"
221
112
  },
222
113
  {
223
114
  "name": "showHeader",
224
115
  "description": "是否显示表头",
225
- "default": "true"
226
- },
227
- {
228
- "name": "pagination",
229
- "description": "是否显示分页",
230
- "attribute": false,
231
- "type": "false | TablePaginationConfig"
116
+ "default": "true",
117
+ "type": "boolean"
232
118
  },
233
119
  {
234
- "name": "size",
235
- "description": "表格大小(antd原生size)",
236
- "type": "SizeType | \"x-small\""
120
+ "name": "bordered",
121
+ "description": "是否显示边框",
122
+ "type": "boolean"
237
123
  },
238
124
  {
239
- "name": "type",
240
- "description": "选框类型(单选/多选)",
125
+ "name": "scrollConfig",
126
+ "description": "滚动配置",
127
+ "default": "{ x: true }",
241
128
  "attribute": false,
242
- "type": "RowSelectionType"
243
- },
244
- {
245
- "name": "shouldUpdateUrlParams",
246
- "description": "是否更新 url 参数。设置为否之后,如果是后台进行分页/排序等功能,则需要结合事件进行编排。如果是前台进行分页/排序,则不需要。",
247
- "default": "true"
129
+ "type": "TableScroll"
248
130
  },
249
131
  {
250
- "name": "shouldRenderWhenUrlParamsUpdate",
251
- "description": "更新 url 参数时是否触发页面重新渲染。仅在`shouldUpdateUrlParams`为true时有效。",
252
- "default": "true"
132
+ "name": "optimizedColumns",
133
+ "description": "优化渲染的列(输入对应的 column.key)",
134
+ "attribute": false,
135
+ "type": "(string | number)[]"
253
136
  },
254
137
  {
255
- "name": "selectedRowKeys",
256
- "description": "指定选中项的 key 数组",
257
- "default": "[]",
258
- "attribute": false,
259
- "type": "React.Key[]"
138
+ "name": "themeVariant",
139
+ "description": "主题变体",
140
+ "type": "\"default\" | \"elevo\""
260
141
  }
261
142
  ],
262
143
  "events": [
263
144
  {
264
- "name": "page.update",
265
- "description": "页码变化,pagePath 可在 fields.page 中设置,默认为 page",
145
+ "name": "page.change",
146
+ "description": "page pageSize 改变的回调",
266
147
  "detail": {
267
- "type": "Record<string, number>"
148
+ "description": "改变后的页码及每页条数",
149
+ "type": "{ page: number; pageSize: number }"
268
150
  }
269
151
  },
270
152
  {
271
- "name": "filter.update",
272
- "description": "每页条数变化 ,pagePath 可在 fields.page 中设置,pageSizePath 可在 fields.pageSize 中设置,默认为 pageSize",
153
+ "name": "page.size.change",
154
+ "description": "pageSize 变化的回调",
155
+ "deprecated": "统一用 `page.change` 事件",
273
156
  "detail": {
274
- "type": "Record<string, number>"
157
+ "description": "改变后的页码及每页条数",
158
+ "type": "{\n page: number;\n pageSize: number;\n }"
275
159
  }
276
160
  },
277
161
  {
278
- "name": "select.update",
279
- "description": "勾选框变化,detail 中为所选的行数据",
162
+ "name": "sort.change",
163
+ "description": "排序变化的回调",
280
164
  "detail": {
281
- "type": "Record<string, any>[]"
165
+ "description": "当前排序的信息",
166
+ "type": "Sort | Sort[] | undefined"
282
167
  }
283
168
  },
284
169
  {
285
- "name": "select.row.keys.update",
286
- "description": "勾选框变化,detail 中为所选的行key集合",
170
+ "name": "row.select",
171
+ "description": "行选中项发生变化时的回调",
287
172
  "detail": {
288
- "type": "string[]"
173
+ "description": "改变后的 rowKey 及行数据",
174
+ "type": "{\n keys: (string | number)[];\n rows: RecordType[];\n info: { type: RowSelectMethod };\n }"
289
175
  }
290
176
  },
291
177
  {
292
- "name": "sort.update",
293
- "description": "排序变化,detail 中的 sort 为对应排序列的 key/dataIndex,order 为升序/降序",
178
+ "name": "row.select.v2",
179
+ "description": "行选中项发生变化时的回调(v2 版本)",
294
180
  "detail": {
295
- "type": "{\n sort: string;\n order: string | number;\n }"
181
+ "description": "改变后的行数据",
182
+ "type": "RecordType[]"
296
183
  }
297
184
  },
298
185
  {
299
186
  "name": "row.expand",
300
- "description": "点击展开图标时触发的事件,事件详情中`expanded`为是否展开,`record`被点击的行信息",
187
+ "description": "点击展开图标时触发",
301
188
  "detail": {
302
- "type": "{\n expanded: boolean;\n record: Record<string, any>;\n }"
189
+ "description": "当前行的展开情况及数据",
190
+ "type": "{\n expanded: boolean;\n record: RecordType;\n }"
303
191
  }
304
192
  },
305
193
  {
306
- "name": "expand.rows.change",
307
- "description": "展开的行变化时触发的事件,事件详情为当前展开的所有行的`rowKey`集合",
194
+ "name": "expanded.rows.change",
195
+ "description": "展开的行变化时触发",
308
196
  "detail": {
309
- "type": "{\n expandedRows: React.Key[];\n }"
197
+ "description": "所有展开行的 key",
198
+ "type": "(string | number)[]"
310
199
  }
311
200
  },
312
201
  {
313
202
  "name": "row.drag",
314
- "description": "表格行拖拽结束发生的事件,事件详情为拖拽后重新排序的所有行数据",
203
+ "description": "表格行拖拽结束发生的事件",
315
204
  "detail": {
316
- "type": "{\n data: Record<string, any>[];\n }"
205
+ "description": "重新排序的行数据、拖拽的行数据、放下位置的行数据",
206
+ "type": "{\n list: RecordType[];\n active: RecordType;\n over: RecordType;\n }"
317
207
  }
318
208
  }
319
209
  ],
320
210
  "slots": [],
321
211
  "methods": [
322
212
  {
323
- "name": "filterSourceData",
213
+ "name": "search",
324
214
  "params": [
325
215
  {
326
- "name": "event",
327
- "type": "CustomEvent"
216
+ "name": "params",
217
+ "type": "{ q: string }"
328
218
  }
329
219
  ],
330
- "description": "搜索过滤",
331
- "returns": {
332
- "type": "void"
333
- }
334
- },
335
- {
336
- "name": "expandAll",
337
- "params": [],
338
- "description": "展开所有行",
220
+ "description": "前端搜索",
339
221
  "returns": {}
340
222
  }
341
223
  ],
342
224
  "parts": [],
343
- "description": "简易表格构件。\n\n⚠️ 通常情况下,应使用 `eo-next-table` 替代。",
344
- "category": "table",
345
- "insider": true
225
+ "description": "大型表格",
226
+ "category": "table"
346
227
  },
347
228
  {
348
229
  "name": "eo-cascader",
@@ -452,226 +333,345 @@
452
333
  "category": "form-input-basic"
453
334
  },
454
335
  {
455
- "name": "eo-next-table",
336
+ "name": "eo-table",
337
+ "alias": [
338
+ "advanced.general-table"
339
+ ],
456
340
  "properties": [
341
+ {
342
+ "name": "showCard",
343
+ "description": "是否显示外层卡片",
344
+ "default": "true"
345
+ },
346
+ {
347
+ "name": "rowSelection",
348
+ "description": "表格行是否可选择,具体查阅:[rowSelection](https://ant.design/components/table-cn/#rowSelection)",
349
+ "attribute": false,
350
+ "type": "false | TableRowSelection<any>"
351
+ },
457
352
  {
458
353
  "name": "rowKey",
459
- "description": "指定表格行的 key",
460
- "default": "\"key\"",
354
+ "description": "指定每一行的 key,不指定则默认为索引 index。强烈建议设置该属性,否则在某些情况下可能行为不如预期。",
461
355
  "type": "string"
462
356
  },
463
357
  {
464
- "name": "columns",
465
- "description": "列定义",
358
+ "name": "hiddenColumns",
359
+ "description": "隐藏相应列(输入对应的 dataIndex 或者 key 即可)",
360
+ "attribute": false,
361
+ "type": "Array<string | number>"
362
+ },
363
+ {
364
+ "name": "showSelectInfo",
365
+ "description": "是否显示已选择信息和清除按钮。仅在设置了`rowSelection`时有效。默认不显示",
366
+ "default": "false"
367
+ },
368
+ {
369
+ "name": "filters",
370
+ "description": "表头过滤的过滤项,key 为 column 的 dataIndex,value 为过滤值集合。",
371
+ "attribute": false,
372
+ "type": "Record<string, string[]>"
373
+ },
374
+ {
375
+ "name": "configProps",
376
+ "description": "ant-design 的 Table 相关配置项,具体查阅:[Table](https://ant.design/components/table-cn/#Table),其中分页配置和行选择配值在构件中设置了常用的默认配置,也可自行覆盖,具体描述见下表",
377
+ "attribute": false,
378
+ "type": "any"
379
+ },
380
+ {
381
+ "name": "sort",
382
+ "description": "被排序列的 dataIndex。通常来自于 url 参数,可以设置成 ${QUERY.sort}。",
383
+ "type": "string | null"
384
+ },
385
+ {
386
+ "name": "order",
387
+ "description": "升序/降序,可以设置成 ${QUERY.order}。",
388
+ "attribute": false,
389
+ "type": "string | number | null"
390
+ },
391
+ {
392
+ "name": "rowDisabledConfig",
393
+ "description": "配置每一行是否禁用,其中 `field` 表示数据源中的字段路径, `value` 表示与其字段比较的值, `operator` 表示两者比较的方法,结果为 `true` 时会禁用当前行, 需要注意的是该配置需要在 `rowSelection: true` 的前提下使用,并且设置 `rowKey` 属性赋予每行唯一的 key,防止顺序变化时造成的错误勾选(如上 demo 所示)",
394
+ "attribute": false,
395
+ "type": "RowDisabledProps | RowDisabledProps[]"
396
+ },
397
+ {
398
+ "name": "expandedRowBrick",
399
+ "description": "自定义行展开的构件 [UseBrickConf](/next-docs/docs/api-reference/brick-types.usesinglebrickconf)",
400
+ "attribute": false,
401
+ "type": "{\n useBrick?: UseSingleBrickConf;\n }"
402
+ },
403
+ {
404
+ "name": "expandIcon",
405
+ "description": "自定义展开图标。",
406
+ "default": "{collapsedIcon:{lib:'antd',icon:'down',theme:'outlined'},expandedIcon:{lib:'antd',icon:'right',theme:'outlined'}}",
407
+ "attribute": false,
408
+ "type": "{\n collapsedIcon: GeneralIconProps;\n expandedIcon: GeneralIconProps;\n }"
409
+ },
410
+ {
411
+ "name": "expandIconAsCell",
412
+ "description": "展开的图标是否为一个单元格,默认显示在第一列;设置为 false 的时候,可以通过`expandIconColumnIndex`属性设置展开的图标在哪一列",
413
+ "default": "true",
414
+ "attribute": false
415
+ },
416
+ {
417
+ "name": "expandIconColumnIndex",
418
+ "description": "展开的图标显示在哪一列,如果没有 rowSelection,默认显示在第一列,否则显示在选择框后面。当`expandIconAsCell`为 false 时,该属性生效。",
419
+ "type": "number"
420
+ },
421
+ {
422
+ "name": "expandRowByClick",
423
+ "description": "通过点击行来展开子行",
424
+ "type": "boolean"
425
+ },
426
+ {
427
+ "name": "optimizedColumns",
428
+ "description": "优化渲染的列(输入对应的 dataIndex),针对配置了 useBrick 的列。当前 antd 在更新 state 的时候,会全量渲染单元格,如果确定某一列在后续操作中不需要重新渲染,例如仅作为展示的单元格,可通过该属性设置以优化性能。注意,在树形表格中,当某一列内包含展开/收起按钮,则不应该设置该列。",
466
429
  "attribute": false,
467
- "type": "Column[]"
430
+ "type": "Array<string | number>"
468
431
  },
469
432
  {
470
- "name": "cell",
471
- "description": "单元格",
472
- "attribute": false,
473
- "type": "CellConfig"
433
+ "name": "stripEmptyExpandableChildren",
434
+ "description": "树形数据展示时是否需要去除空数组",
435
+ "default": "false",
436
+ "attribute": false
474
437
  },
475
438
  {
476
- "name": "dataSource",
477
- "description": "数据源",
478
- "attribute": false,
479
- "type": "DataSource"
439
+ "name": "defaultExpandAllRows",
440
+ "description": "初始时,是否展开所有行",
441
+ "type": "boolean"
480
442
  },
481
443
  {
482
- "name": "frontSearch",
483
- "description": "是否前端搜索",
444
+ "name": "ellipsisInfo",
445
+ "description": "是否显示省略信息",
484
446
  "type": "boolean"
485
447
  },
486
448
  {
487
- "name": "pagination",
488
- "description": "分页配置",
449
+ "name": "expandedRowKeys",
450
+ "description": "展开的行的 rowKey",
489
451
  "attribute": false,
490
- "type": "PaginationType"
452
+ "type": "string[]"
491
453
  },
492
454
  {
493
- "name": "loading",
494
- "description": "显示加载中状态",
455
+ "name": "selectAllChildren",
456
+ "description": "表格树形数据展示的时候,行选择父节点的时候是否同步勾选/取消勾选所有子节点,并且被同步勾选的子节点不能单独取消。注意,该属性必须设置 `rowKey` 属性。",
495
457
  "type": "boolean"
496
458
  },
497
459
  {
498
- "name": "multiSort",
499
- "description": "是否支持多列排序,前端搜索时需设置 column.sortPriority 优先级",
460
+ "name": "defaultSelectAll",
461
+ "description": "是否默认选择所有行。注意,该属性必须设置 `rowKey` 属性。",
500
462
  "type": "boolean"
501
463
  },
502
464
  {
503
- "name": "sort",
504
- "description": "排序信息",
505
- "attribute": false,
506
- "type": "Sort | Sort[]"
465
+ "name": "childrenColumnName",
466
+ "description": "指定树形结构的列名",
467
+ "default": "children",
468
+ "attribute": false
507
469
  },
508
470
  {
509
- "name": "rowSelection",
510
- "description": "表格行可选择配置",
511
- "attribute": false,
512
- "type": "RowSelectionType"
471
+ "name": "sortable",
472
+ "description": "是否支持排序。默认开启,当对应列的sorter设置成true时则可排序。sortable为false时则排序都不生效。",
473
+ "default": "true",
474
+ "attribute": false
513
475
  },
514
476
  {
515
- "name": "selectedRowKeys",
516
- "description": "选中项的 key",
517
- "attribute": false,
518
- "type": "(string | number)[]"
477
+ "name": "frontSearch",
478
+ "description": "是否前端进行搜索,配合`presentational-bricks.brick-input`使用",
479
+ "type": "boolean"
519
480
  },
520
481
  {
521
- "name": "hiddenColumns",
522
- "description": "隐藏的列(输入对应的 column.key)",
523
- "attribute": false,
524
- "type": "(string | number)[]"
482
+ "name": "frontSearchQuery",
483
+ "description": "前端搜索参数",
484
+ "default": "\"\""
525
485
  },
526
486
  {
527
- "name": "expandable",
528
- "description": "表格行展开配置",
487
+ "name": "exactSearch",
488
+ "description": "是否精确搜索",
489
+ "type": "boolean"
490
+ },
491
+ {
492
+ "name": "frontSearchFilterKeys",
493
+ "description": "进行前端搜索的字段,支持嵌套的写法如[\"name\",\"value.a\"],不配置的时候默认为对所有 columns 的 dataIndex[]进行前端搜索",
529
494
  "attribute": false,
530
- "type": "ExpandableType"
495
+ "type": "string[]"
531
496
  },
532
497
  {
533
- "name": "expandedRowKeys",
534
- "description": "展开项的 key",
498
+ "name": "page",
499
+ "description": "页码。后台搜索的时候一般不需要配置,列表接口返回格式通常为{list:[],page:1,pageSize:10,total:20},即默认取自 page;前台搜索的时候,一般配置成 \"${query.page=1|number}\"",
500
+ "type": "number"
501
+ },
502
+ {
503
+ "name": "pageSize",
504
+ "description": "页码条数。后台搜索的时候一般不需要配置,列表接口返回格式通常为{list:[],page:1,pageSize:10,total:20},即默认取自 pageSize/page_size;前台搜索的时候,一般配置成 \"${query.pageSize=10|number}\"",
505
+ "type": "number"
506
+ },
507
+ {
508
+ "name": "scrollConfigs",
509
+ "description": "",
510
+ "default": "{ x: true }",
535
511
  "attribute": false,
536
- "type": "(string | number)[]"
512
+ "type": "TableProps<unknown>[\"scroll\"]"
537
513
  },
538
514
  {
539
- "name": "childrenColumnName",
540
- "description": "树形结构的列名",
541
- "default": "\"children\"",
542
- "type": "string"
515
+ "name": "qField",
516
+ "description": "把过滤条件更新到 url 时的字段名",
517
+ "default": "\"q\""
543
518
  },
544
519
  {
545
- "name": "rowDraggable",
546
- "description": "表格行拖拽配置",
520
+ "name": "tableDraggable",
521
+ "description": "表格行是否可拖拽,注意,树形数据的表格不支持该功能",
547
522
  "type": "boolean"
548
523
  },
549
524
  {
550
- "name": "searchFields",
551
- "description": "进行前端搜索的字段,支持嵌套的写法。不配置的时候默认为对所有 column.dataIndex 进行前端搜索",
552
- "attribute": false,
553
- "type": "(string | string[])[]"
525
+ "name": "zebraPattern",
526
+ "description": "是否展示斑马纹",
527
+ "type": "boolean"
554
528
  },
555
529
  {
556
- "name": "size",
557
- "description": "表格大小",
558
- "default": "\"large\"",
559
- "type": "TableProps<RecordType>[\"size\"]"
530
+ "name": "storeCheckedByUrl",
531
+ "description": "翻页时是否记住之前选中的项。注意,选中项的rowKey将保存在url中,如果不设置rowKey,该设置不生效。如果选择太多可能会造成url过长,请谨慎使用",
532
+ "type": "boolean"
560
533
  },
561
534
  {
562
- "name": "showHeader",
563
- "description": "是否显示表头",
564
- "default": "true",
535
+ "name": "extraRows",
536
+ "description": "额外的行,通常为跨页勾选时,不在当前页的行",
537
+ "default": "[]",
538
+ "attribute": false,
539
+ "type": "Record<string, unknown>[]"
540
+ },
541
+ {
542
+ "name": "autoSelectParentWhenAllChildrenSelected",
543
+ "description": "当所有子节点选中时,自动选中父节点",
565
544
  "type": "boolean"
566
545
  },
567
546
  {
568
- "name": "bordered",
569
- "description": "是否显示边框",
547
+ "name": "thTransparent",
548
+ "description": "表格表头是否透明",
570
549
  "type": "boolean"
571
550
  },
572
551
  {
573
- "name": "scrollConfig",
574
- "description": "滚动配置",
575
- "default": "{ x: true }",
552
+ "name": "showHeader",
553
+ "description": "是否显示表头",
554
+ "default": "true"
555
+ },
556
+ {
557
+ "name": "pagination",
558
+ "description": "是否显示分页",
576
559
  "attribute": false,
577
- "type": "TableScroll"
560
+ "type": "false | TablePaginationConfig"
578
561
  },
579
562
  {
580
- "name": "optimizedColumns",
581
- "description": "优化渲染的列(输入对应的 column.key)",
563
+ "name": "size",
564
+ "description": "表格大小(antd原生size)",
565
+ "type": "SizeType | \"x-small\""
566
+ },
567
+ {
568
+ "name": "type",
569
+ "description": "选框类型(单选/多选)",
582
570
  "attribute": false,
583
- "type": "(string | number)[]"
571
+ "type": "RowSelectionType"
584
572
  },
585
573
  {
586
- "name": "themeVariant",
587
- "description": "主题变体",
588
- "type": "\"default\" | \"elevo\""
574
+ "name": "shouldUpdateUrlParams",
575
+ "description": "是否更新 url 参数。设置为否之后,如果是后台进行分页/排序等功能,则需要结合事件进行编排。如果是前台进行分页/排序,则不需要。",
576
+ "default": "true"
577
+ },
578
+ {
579
+ "name": "shouldRenderWhenUrlParamsUpdate",
580
+ "description": "更新 url 参数时是否触发页面重新渲染。仅在`shouldUpdateUrlParams`为true时有效。",
581
+ "default": "true"
582
+ },
583
+ {
584
+ "name": "selectedRowKeys",
585
+ "description": "指定选中项的 key 数组",
586
+ "default": "[]",
587
+ "attribute": false,
588
+ "type": "React.Key[]"
589
589
  }
590
590
  ],
591
591
  "events": [
592
592
  {
593
- "name": "page.change",
594
- "description": "page pageSize 改变的回调",
593
+ "name": "page.update",
594
+ "description": "页码变化,pagePath 可在 fields.page 中设置,默认为 page",
595
595
  "detail": {
596
- "description": "改变后的页码及每页条数",
597
- "type": "{ page: number; pageSize: number }"
596
+ "type": "Record<string, number>"
598
597
  }
599
598
  },
600
599
  {
601
- "name": "page.size.change",
602
- "description": "pageSize 变化的回调",
603
- "deprecated": "统一用 `page.change` 事件",
600
+ "name": "filter.update",
601
+ "description": "每页条数变化 ,pagePath 可在 fields.page 中设置,pageSizePath 可在 fields.pageSize 中设置,默认为 pageSize",
604
602
  "detail": {
605
- "description": "改变后的页码及每页条数",
606
- "type": "{\n page: number;\n pageSize: number;\n }"
603
+ "type": "Record<string, number>"
607
604
  }
608
605
  },
609
606
  {
610
- "name": "sort.change",
611
- "description": "排序变化的回调",
607
+ "name": "select.update",
608
+ "description": "勾选框变化,detail 中为所选的行数据",
612
609
  "detail": {
613
- "description": "当前排序的信息",
614
- "type": "Sort | Sort[] | undefined"
610
+ "type": "Record<string, any>[]"
615
611
  }
616
612
  },
617
613
  {
618
- "name": "row.select",
619
- "description": "行选中项发生变化时的回调",
614
+ "name": "select.row.keys.update",
615
+ "description": "勾选框变化,detail 中为所选的行key集合",
620
616
  "detail": {
621
- "description": "改变后的 rowKey 及行数据",
622
- "type": "{\n keys: (string | number)[];\n rows: RecordType[];\n info: { type: RowSelectMethod };\n }"
617
+ "type": "string[]"
623
618
  }
624
619
  },
625
620
  {
626
- "name": "row.select.v2",
627
- "description": "行选中项发生变化时的回调(v2 版本)",
621
+ "name": "sort.update",
622
+ "description": "排序变化,detail 中的 sort 为对应排序列的 key/dataIndex,order 为升序/降序",
628
623
  "detail": {
629
- "description": "改变后的行数据",
630
- "type": "RecordType[]"
624
+ "type": "{\n sort: string;\n order: string | number;\n }"
631
625
  }
632
626
  },
633
627
  {
634
628
  "name": "row.expand",
635
- "description": "点击展开图标时触发",
629
+ "description": "点击展开图标时触发的事件,事件详情中`expanded`为是否展开,`record`被点击的行信息",
636
630
  "detail": {
637
- "description": "当前行的展开情况及数据",
638
- "type": "{\n expanded: boolean;\n record: RecordType;\n }"
631
+ "type": "{\n expanded: boolean;\n record: Record<string, any>;\n }"
639
632
  }
640
633
  },
641
634
  {
642
- "name": "expanded.rows.change",
643
- "description": "展开的行变化时触发",
635
+ "name": "expand.rows.change",
636
+ "description": "展开的行变化时触发的事件,事件详情为当前展开的所有行的`rowKey`集合",
644
637
  "detail": {
645
- "description": "所有展开行的 key",
646
- "type": "(string | number)[]"
638
+ "type": "{\n expandedRows: React.Key[];\n }"
647
639
  }
648
640
  },
649
641
  {
650
642
  "name": "row.drag",
651
- "description": "表格行拖拽结束发生的事件",
643
+ "description": "表格行拖拽结束发生的事件,事件详情为拖拽后重新排序的所有行数据",
652
644
  "detail": {
653
- "description": "重新排序的行数据、拖拽的行数据、放下位置的行数据",
654
- "type": "{\n list: RecordType[];\n active: RecordType;\n over: RecordType;\n }"
645
+ "type": "{\n data: Record<string, any>[];\n }"
655
646
  }
656
647
  }
657
648
  ],
658
649
  "slots": [],
659
650
  "methods": [
660
651
  {
661
- "name": "search",
652
+ "name": "filterSourceData",
662
653
  "params": [
663
654
  {
664
- "name": "params",
665
- "type": "{ q: string }"
655
+ "name": "event",
656
+ "type": "CustomEvent"
666
657
  }
667
658
  ],
668
- "description": "前端搜索",
659
+ "description": "搜索过滤",
660
+ "returns": {
661
+ "type": "void"
662
+ }
663
+ },
664
+ {
665
+ "name": "expandAll",
666
+ "params": [],
667
+ "description": "展开所有行",
669
668
  "returns": {}
670
669
  }
671
670
  ],
672
671
  "parts": [],
673
- "description": "大型表格",
674
- "category": "table"
672
+ "description": "简易表格构件。\n\n⚠️ 通常情况下,应使用 `eo-next-table` 替代。",
673
+ "category": "table",
674
+ "insider": true
675
675
  },
676
676
  {
677
677
  "name": "eo-workbench-layout",