@next-bricks/advanced 0.51.3 → 0.51.5
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/bricks.json +22 -22
- package/dist/chunks/{1889.b0931dce.js → 1889.f8507811.js} +2 -2
- package/dist/chunks/{1889.b0931dce.js.map → 1889.f8507811.js.map} +1 -1
- package/dist/chunks/3171.5a42835a.js +2 -0
- package/dist/chunks/3171.5a42835a.js.map +1 -0
- package/dist/chunks/4758.0ee6b1c2.js +3 -0
- package/dist/chunks/4758.0ee6b1c2.js.map +1 -0
- package/dist/chunks/5399.90afc78f.js +2 -0
- package/dist/chunks/5399.90afc78f.js.map +1 -0
- package/dist/chunks/5552.3af82478.js +2 -0
- package/dist/chunks/5552.3af82478.js.map +1 -0
- package/dist/chunks/6376.a5e3cba3.js +2 -0
- package/dist/chunks/6376.a5e3cba3.js.map +1 -0
- package/dist/chunks/{6070.74d93326.js → 7039.0ea489d5.js} +2 -2
- package/dist/chunks/7039.0ea489d5.js.map +1 -0
- package/dist/chunks/8382.ade8275e.js +2 -0
- package/dist/chunks/8382.ade8275e.js.map +1 -0
- package/dist/chunks/9118.f65d12a9.js +3 -0
- package/dist/chunks/9118.f65d12a9.js.map +1 -0
- package/dist/chunks/948.c45999d0.js +3 -0
- package/dist/chunks/948.c45999d0.js.map +1 -0
- package/dist/chunks/eo-cascader.8d423eaa.js +2 -0
- package/dist/chunks/eo-cascader.8d423eaa.js.map +1 -0
- package/dist/chunks/{eo-next-table.25f4bf4d.js → eo-next-table.7f8c557a.js} +2 -2
- package/dist/chunks/{eo-next-table.25f4bf4d.js.map → eo-next-table.7f8c557a.js.map} +1 -1
- package/dist/chunks/{eo-table.5dd09651.js → eo-table.9b4334a3.js} +2 -2
- package/dist/chunks/eo-table.9b4334a3.js.map +1 -0
- package/dist/chunks/eo-text-tooltip.74db365e.js.map +1 -1
- package/dist/chunks/eo-tree-select.49c195a4.js +2 -0
- package/dist/chunks/eo-tree-select.49c195a4.js.map +1 -0
- package/dist/chunks/{eo-tree.22180778.js → eo-tree.e8729dea.js} +3 -3
- package/dist/chunks/{eo-tree.22180778.js.map → eo-tree.e8729dea.js.map} +1 -1
- package/dist/chunks/{eo-workbench-layout-v2.24da89e7.js → eo-workbench-layout-v2.12b31a22.js} +3 -3
- package/dist/chunks/eo-workbench-layout-v2.12b31a22.js.map +1 -0
- package/dist/chunks/{eo-workbench-layout.1ed8ce80.js → eo-workbench-layout.39666f6e.js} +2 -2
- package/dist/chunks/eo-workbench-layout.39666f6e.js.map +1 -0
- package/dist/chunks/main.06ea33e1.js +2 -0
- package/dist/chunks/main.06ea33e1.js.map +1 -0
- package/dist/chunks/pdf-viewer.036787d7.js.map +1 -1
- package/dist/examples.json +17 -11
- package/dist/index.61a04a59.js +2 -0
- package/dist/index.61a04a59.js.map +1 -0
- package/dist/manifest.json +656 -563
- package/dist/types.json +244 -247
- package/dist-types/cascader/index.d.ts +18 -0
- package/dist-types/interfaces/workbench.d.ts +2 -2
- package/dist-types/next-table/CacheUseBrickItem.d.ts +2 -2
- package/dist-types/next-table/index.d.ts +2 -1
- package/dist-types/next-table/interface.d.ts +5 -5
- package/dist-types/pdf-viewer/index.d.ts +7 -1
- package/dist-types/table/BrickTable.d.ts +2 -2
- package/dist-types/table/index.d.ts +8 -6
- package/dist-types/text-tooltip/index.d.ts +5 -4
- package/dist-types/tree/index.d.ts +3 -3
- package/dist-types/tree-select/index.d.ts +41 -1
- package/dist-types/workbench-layout/index.d.ts +28 -3
- package/dist-types/workbench-layout-v2/index.d.ts +34 -12
- package/docs/eo-cascader.md +184 -1
- package/docs/eo-cascader.react.md +247 -0
- package/docs/eo-next-table.md +343 -168
- package/docs/eo-next-table.react.md +923 -0
- package/docs/eo-table.md +296 -0
- package/docs/eo-table.react.md +223 -0
- package/docs/eo-text-tooltip.md +46 -1
- package/docs/eo-text-tooltip.react.md +69 -0
- package/docs/eo-tree-select.md +127 -1
- package/docs/eo-tree-select.react.md +206 -0
- package/docs/eo-tree.md +108 -2
- package/docs/eo-tree.react.md +220 -0
- package/docs/eo-workbench-layout-v2.md +204 -0
- package/docs/eo-workbench-layout-v2.react.md +162 -0
- package/docs/eo-workbench-layout.md +45 -3
- package/docs/eo-workbench-layout.react.md +141 -0
- package/docs/pdf-viewer.md +48 -1
- package/docs/pdf-viewer.react.md +63 -0
- package/package.json +2 -2
- package/dist/chunks/3171.a0713c82.js +0 -2
- package/dist/chunks/3171.a0713c82.js.map +0 -1
- package/dist/chunks/4758.5f79e636.js +0 -3
- package/dist/chunks/4758.5f79e636.js.map +0 -1
- package/dist/chunks/4837.04c758cf.js +0 -2
- package/dist/chunks/4837.04c758cf.js.map +0 -1
- package/dist/chunks/5139.30dacc51.js +0 -2
- package/dist/chunks/5139.30dacc51.js.map +0 -1
- package/dist/chunks/5399.c6d3cd26.js +0 -2
- package/dist/chunks/5399.c6d3cd26.js.map +0 -1
- package/dist/chunks/5552.b8201181.js +0 -2
- package/dist/chunks/5552.b8201181.js.map +0 -1
- package/dist/chunks/6070.74d93326.js.map +0 -1
- package/dist/chunks/7218.bcb25b61.js +0 -2
- package/dist/chunks/7218.bcb25b61.js.map +0 -1
- package/dist/chunks/8382.d552299f.js +0 -2
- package/dist/chunks/8382.d552299f.js.map +0 -1
- package/dist/chunks/9118.cc8511ac.js +0 -3
- package/dist/chunks/9118.cc8511ac.js.map +0 -1
- package/dist/chunks/948.e02bc040.js +0 -3
- package/dist/chunks/948.e02bc040.js.map +0 -1
- package/dist/chunks/eo-cascader.86a685ca.js +0 -2
- package/dist/chunks/eo-cascader.86a685ca.js.map +0 -1
- package/dist/chunks/eo-table.5dd09651.js.map +0 -1
- package/dist/chunks/eo-tree-select.31dae71f.js +0 -2
- package/dist/chunks/eo-tree-select.31dae71f.js.map +0 -1
- package/dist/chunks/eo-workbench-layout-v2.24da89e7.js.map +0 -1
- package/dist/chunks/eo-workbench-layout.1ed8ce80.js.map +0 -1
- package/dist/chunks/main.f43a8ad8.js +0 -2
- package/dist/chunks/main.f43a8ad8.js.map +0 -1
- package/dist/index.3d8026b9.js +0 -2
- package/dist/index.3d8026b9.js.map +0 -1
- /package/dist/chunks/{4758.5f79e636.js.LICENSE.txt → 4758.0ee6b1c2.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{9118.cc8511ac.js.LICENSE.txt → 9118.f65d12a9.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{948.e02bc040.js.LICENSE.txt → 948.c45999d0.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-tree.22180778.js.LICENSE.txt → eo-tree.e8729dea.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-workbench-layout-v2.24da89e7.js.LICENSE.txt → eo-workbench-layout-v2.12b31a22.js.LICENSE.txt} +0 -0
package/docs/eo-next-table.md
CHANGED
|
@@ -1,9 +1,70 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
tagName: eo-next-table
|
|
3
|
+
displayName: WrappedEoNextTable
|
|
4
|
+
description: 大型表格
|
|
5
|
+
category: table
|
|
6
|
+
source: "@next-bricks/advanced"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# eo-next-table
|
|
10
|
+
|
|
11
|
+
> 大型表格
|
|
12
|
+
|
|
13
|
+
## Props
|
|
14
|
+
|
|
15
|
+
| 属性 | 类型 | 必填 | 默认值 | 说明 |
|
|
16
|
+
| ------------------ | ------------------------ | ---- | ------------- | ------------------------------------------------------------------------------------------ |
|
|
17
|
+
| rowKey | `string` | 否 | `"key"` | 指定表格行的 key |
|
|
18
|
+
| columns | `Column[]` | 否 | - | 列定义 |
|
|
19
|
+
| cell | `CellConfig` | 否 | - | 单元格统一配置,可配置 useBrick 自定义渲染所有单元格及表头 |
|
|
20
|
+
| dataSource | `DataSource` | 否 | - | 数据源 |
|
|
21
|
+
| frontSearch | `boolean` | 否 | - | 是否前端搜索 |
|
|
22
|
+
| pagination | `PaginationType` | 否 | - | 分页配置 |
|
|
23
|
+
| loading | `boolean` | 否 | - | 显示加载中状态 |
|
|
24
|
+
| multiSort | `boolean` | 否 | - | 是否支持多列排序,前端搜索时需设置 column.sortPriority 优先级 |
|
|
25
|
+
| sort | `Sort \| Sort[]` | 否 | - | 排序信息 |
|
|
26
|
+
| rowSelection | `RowSelectionType` | 否 | - | 表格行可选择配置 |
|
|
27
|
+
| selectedRowKeys | `(string \| number)[]` | 否 | - | 选中项的 key |
|
|
28
|
+
| hiddenColumns | `(string \| number)[]` | 否 | - | 隐藏的列(输入对应的 column.key) |
|
|
29
|
+
| expandable | `ExpandableType` | 否 | - | 表格行展开配置 |
|
|
30
|
+
| expandedRowKeys | `(string \| number)[]` | 否 | - | 展开项的 key |
|
|
31
|
+
| childrenColumnName | `string` | 否 | `"children"` | 树形结构的列名 |
|
|
32
|
+
| rowDraggable | `boolean` | 否 | - | 表格行拖拽配置 |
|
|
33
|
+
| rowClickable | `boolean` | 否 | - | 表格行可点击(激活鼠标手势) |
|
|
34
|
+
| searchFields | `(string \| string[])[]` | 否 | - | 进行前端搜索的字段,支持嵌套的写法。不配置的时候默认为对所有 column.dataIndex 进行前端搜索 |
|
|
35
|
+
| size | `TableProps["size"]` | 否 | `"large"` | 表格大小 |
|
|
36
|
+
| showHeader | `boolean` | 否 | `true` | 是否显示表头 |
|
|
37
|
+
| bordered | `boolean` | 否 | - | 是否显示边框 |
|
|
38
|
+
| scrollConfig | `TableScroll` | 否 | `{ x: true }` | 滚动配置 |
|
|
39
|
+
| optimizedColumns | `(string \| number)[]` | 否 | - | 优化渲染的列(输入对应的 column.key) |
|
|
40
|
+
| themeVariant | `"default" \| "elevo"` | 否 | - | 主题变体 |
|
|
41
|
+
|
|
42
|
+
## Events
|
|
43
|
+
|
|
44
|
+
| 事件 | detail | 说明 |
|
|
45
|
+
| -------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------ |
|
|
46
|
+
| page.change | `PageOrPageSizeChangeEventDetail` — 改变后的页码及每页条数 | page 或 pageSize 改变的回调 |
|
|
47
|
+
| page.size.change | `PageOrPageSizeChangeEventDetail` — 改变后的页码及每页条数 | pageSize 变化的回调(已废弃,统一用 page.change 事件) |
|
|
48
|
+
| sort.change | `Sort \| Sort[] \| undefined` — 当前排序的信息 | 排序变化的回调 |
|
|
49
|
+
| row.click | `RecordType` — 被点击的行数据 | 行点击时的回调 |
|
|
50
|
+
| row.select | `RowSelectEventDetail` — 改变后的 rowKey 及行数据 | 行选中项发生变化时的回调 |
|
|
51
|
+
| row.select.v2 | `RecordType[]` — 改变后的行数据 | 行选中项发生变化时的回调(v2 版本) |
|
|
52
|
+
| row.expand | `RowExpandEventDetail` — 当前行的展开情况及数据 | 点击展开图标时触发 |
|
|
53
|
+
| expanded.rows.change | `(string \| number)[]` — 所有展开行的 key | 展开的行变化时触发 |
|
|
54
|
+
| row.drag | `RowDragEventDetail` — 重新排序的行数据、拖拽的行数据、放下位置的行数据 | 表格行拖拽结束发生的事件 |
|
|
55
|
+
|
|
56
|
+
## Methods
|
|
57
|
+
|
|
58
|
+
| 方法 | 参数 | 返回值 | 说明 |
|
|
59
|
+
| ------ | -------------------------------------------------------------------- | ------ | -------- |
|
|
60
|
+
| search | <ul><li>`params: { q: string }` - 搜索参数,q 为搜索关键词</li></ul> | `void` | 前端搜索 |
|
|
2
61
|
|
|
3
62
|
## Examples
|
|
4
63
|
|
|
5
64
|
### Basic
|
|
6
65
|
|
|
66
|
+
展示大型表格的基本用法,配置 columns 和 dataSource,并支持分页与操作列。
|
|
67
|
+
|
|
7
68
|
```yaml preview
|
|
8
69
|
- brick: eo-next-table
|
|
9
70
|
events:
|
|
@@ -125,6 +186,8 @@
|
|
|
125
186
|
|
|
126
187
|
### Fixed & Scroll & useBrick
|
|
127
188
|
|
|
189
|
+
展示固定列、水平滚动及通过 useBrick 自定义单元格内容。
|
|
190
|
+
|
|
128
191
|
```yaml preview
|
|
129
192
|
- brick: eo-next-table
|
|
130
193
|
events:
|
|
@@ -246,6 +309,8 @@
|
|
|
246
309
|
|
|
247
310
|
### Front Search
|
|
248
311
|
|
|
312
|
+
开启前端搜索,配合 search 方法与 searchFields 实现关键字过滤,支持多列排序。
|
|
313
|
+
|
|
249
314
|
```yaml preview
|
|
250
315
|
- brick: eo-search-bar
|
|
251
316
|
children:
|
|
@@ -347,6 +412,8 @@
|
|
|
347
412
|
|
|
348
413
|
### Row Selection
|
|
349
414
|
|
|
415
|
+
配置 rowSelection 开启行选择功能,选中状态变化时触发 row.select 事件。
|
|
416
|
+
|
|
350
417
|
```yaml preview
|
|
351
418
|
- brick: eo-next-table
|
|
352
419
|
events:
|
|
@@ -425,8 +492,48 @@
|
|
|
425
492
|
address: Taiwan
|
|
426
493
|
```
|
|
427
494
|
|
|
495
|
+
### Row Click
|
|
496
|
+
|
|
497
|
+
配置 rowClickable 开启行点击功能,点击行时触发 row.click 事件。
|
|
498
|
+
|
|
499
|
+
```yaml preview
|
|
500
|
+
- brick: eo-next-table
|
|
501
|
+
events:
|
|
502
|
+
row.click:
|
|
503
|
+
- action: console.log
|
|
504
|
+
properties:
|
|
505
|
+
rowClickable: true
|
|
506
|
+
pagination: false
|
|
507
|
+
columns:
|
|
508
|
+
- dataIndex: name
|
|
509
|
+
key: name
|
|
510
|
+
title: Name
|
|
511
|
+
- dataIndex: age
|
|
512
|
+
key: age
|
|
513
|
+
title: Age
|
|
514
|
+
- dataIndex: address
|
|
515
|
+
key: address
|
|
516
|
+
title: Address
|
|
517
|
+
dataSource:
|
|
518
|
+
list:
|
|
519
|
+
- key: 0
|
|
520
|
+
name: Jack
|
|
521
|
+
age: 18
|
|
522
|
+
address: Guangzhou
|
|
523
|
+
- key: 1
|
|
524
|
+
name: Alex
|
|
525
|
+
age: 20
|
|
526
|
+
address: Shanghai
|
|
527
|
+
- key: 2
|
|
528
|
+
name: Lucy
|
|
529
|
+
age: 16
|
|
530
|
+
address: Yunnan
|
|
531
|
+
```
|
|
532
|
+
|
|
428
533
|
### Expandable
|
|
429
534
|
|
|
535
|
+
配置 expandable 开启行展开功能,支持展开行内嵌套表格。
|
|
536
|
+
|
|
430
537
|
```yaml preview
|
|
431
538
|
- brick: eo-next-table
|
|
432
539
|
events:
|
|
@@ -542,6 +649,8 @@
|
|
|
542
649
|
|
|
543
650
|
### Bordered
|
|
544
651
|
|
|
652
|
+
展示带边框的表格样式。
|
|
653
|
+
|
|
545
654
|
```yaml preview
|
|
546
655
|
- brick: eo-next-table
|
|
547
656
|
properties:
|
|
@@ -576,6 +685,8 @@
|
|
|
576
685
|
|
|
577
686
|
### Size
|
|
578
687
|
|
|
688
|
+
展示不同尺寸(large、middle、small)的表格效果。
|
|
689
|
+
|
|
579
690
|
```yaml preview
|
|
580
691
|
brick: eo-content-layout
|
|
581
692
|
children:
|
|
@@ -622,6 +733,8 @@ children:
|
|
|
622
733
|
|
|
623
734
|
### Draggable
|
|
624
735
|
|
|
736
|
+
开启 rowDraggable 支持行拖拽排序,拖拽结束触发 row.drag 事件。
|
|
737
|
+
|
|
625
738
|
```yaml preview
|
|
626
739
|
- brick: eo-next-table
|
|
627
740
|
events:
|
|
@@ -691,6 +804,8 @@ children:
|
|
|
691
804
|
|
|
692
805
|
### RowSpan & ColSpan
|
|
693
806
|
|
|
807
|
+
通过列配置的 colSpan、cellColSpanKey、cellRowSpanKey 实现单元格合并。
|
|
808
|
+
|
|
694
809
|
```yaml preview
|
|
695
810
|
- brick: eo-next-table
|
|
696
811
|
properties:
|
|
@@ -758,7 +873,7 @@ children:
|
|
|
758
873
|
|
|
759
874
|
### Tree
|
|
760
875
|
|
|
761
|
-
设置 childrenColumnName 来指定树形结构的列名,展开功能的配置可以使用 expandable
|
|
876
|
+
设置 childrenColumnName 来指定树形结构的列名,展开功能的配置可以使用 expandable。
|
|
762
877
|
|
|
763
878
|
```yaml preview
|
|
764
879
|
- brick: eo-next-table
|
|
@@ -833,170 +948,10 @@ children:
|
|
|
833
948
|
address: Taiwan
|
|
834
949
|
```
|
|
835
950
|
|
|
836
|
-
#### With Row Selection
|
|
837
|
-
|
|
838
|
-
设置 rowSelection.checkStrictly 来控制父子数据选中状态是否关联。注意,关联的时候,节点勾选传导策略为【只勾选可触达的可勾选节点】
|
|
839
|
-
|
|
840
|
-
```yaml preview
|
|
841
|
-
- brick: eo-next-table
|
|
842
|
-
events:
|
|
843
|
-
row.select:
|
|
844
|
-
- action: console.log
|
|
845
|
-
properties:
|
|
846
|
-
pagination: false
|
|
847
|
-
childrenColumnName: student
|
|
848
|
-
rowSelection:
|
|
849
|
-
checkStrictly: false
|
|
850
|
-
indentSize: 50
|
|
851
|
-
rowDisabled: <% DATA.rowData.age > 30 %>
|
|
852
|
-
columns:
|
|
853
|
-
- dataIndex: name
|
|
854
|
-
key: name
|
|
855
|
-
title: Name
|
|
856
|
-
- dataIndex: age
|
|
857
|
-
key: age
|
|
858
|
-
title: Age
|
|
859
|
-
- dataIndex: address
|
|
860
|
-
key: address
|
|
861
|
-
title: Address
|
|
862
|
-
dataSource:
|
|
863
|
-
list:
|
|
864
|
-
- key: "1"
|
|
865
|
-
name: Jack
|
|
866
|
-
age: 18
|
|
867
|
-
address: Guangzhou
|
|
868
|
-
student:
|
|
869
|
-
- key: "11"
|
|
870
|
-
name: Alex
|
|
871
|
-
age: 20
|
|
872
|
-
address: Shanghai
|
|
873
|
-
- key: "12"
|
|
874
|
-
name: Lucy
|
|
875
|
-
age: 16
|
|
876
|
-
address: Yunnan
|
|
877
|
-
- key: "13"
|
|
878
|
-
name: Sam
|
|
879
|
-
age: 34
|
|
880
|
-
address: Guangzhou
|
|
881
|
-
- key: "2"
|
|
882
|
-
name: Bob
|
|
883
|
-
age: 27
|
|
884
|
-
address: Hainan
|
|
885
|
-
student:
|
|
886
|
-
- key: "21"
|
|
887
|
-
name: Ava
|
|
888
|
-
age: 23
|
|
889
|
-
address: Beijing
|
|
890
|
-
- key: "22"
|
|
891
|
-
name: Sophia
|
|
892
|
-
age: 20
|
|
893
|
-
address: Shanghai
|
|
894
|
-
- key: "23"
|
|
895
|
-
name: Charlotte
|
|
896
|
-
age: 35
|
|
897
|
-
address: Chongqing
|
|
898
|
-
student:
|
|
899
|
-
- key: "231"
|
|
900
|
-
name: Mia
|
|
901
|
-
age: 18
|
|
902
|
-
address: Chengdu
|
|
903
|
-
- key: "232"
|
|
904
|
-
name: Noah
|
|
905
|
-
age: 38
|
|
906
|
-
address: Hainan
|
|
907
|
-
- key: "233"
|
|
908
|
-
name: William
|
|
909
|
-
age: 16
|
|
910
|
-
address: Taiwan
|
|
911
|
-
```
|
|
912
|
-
|
|
913
|
-
#### With Front Search
|
|
914
|
-
|
|
915
|
-
```yaml preview
|
|
916
|
-
- brick: eo-search-bar
|
|
917
|
-
children:
|
|
918
|
-
- brick: eo-search
|
|
919
|
-
slot: start
|
|
920
|
-
properties:
|
|
921
|
-
placeholder: Enter keyword
|
|
922
|
-
events:
|
|
923
|
-
search:
|
|
924
|
-
target: "#table"
|
|
925
|
-
method: search
|
|
926
|
-
args:
|
|
927
|
-
- q: <% EVENT.detail %>
|
|
928
|
-
- brick: eo-next-table
|
|
929
|
-
properties:
|
|
930
|
-
id: table
|
|
931
|
-
searchFields:
|
|
932
|
-
- name
|
|
933
|
-
- age
|
|
934
|
-
- address
|
|
935
|
-
pagination: false
|
|
936
|
-
childrenColumnName: student
|
|
937
|
-
columns:
|
|
938
|
-
- dataIndex: name
|
|
939
|
-
key: name
|
|
940
|
-
title: Name
|
|
941
|
-
- dataIndex: age
|
|
942
|
-
key: age
|
|
943
|
-
title: Age
|
|
944
|
-
- dataIndex: address
|
|
945
|
-
key: address
|
|
946
|
-
title: Address
|
|
947
|
-
dataSource:
|
|
948
|
-
list:
|
|
949
|
-
- key: "1"
|
|
950
|
-
name: Jack
|
|
951
|
-
age: 18
|
|
952
|
-
address: Guangzhou
|
|
953
|
-
student:
|
|
954
|
-
- key: "11"
|
|
955
|
-
name: Alex
|
|
956
|
-
age: 20
|
|
957
|
-
address: Shanghai
|
|
958
|
-
- key: "12"
|
|
959
|
-
name: Lucy
|
|
960
|
-
age: 16
|
|
961
|
-
address: Yunnan
|
|
962
|
-
- key: "13"
|
|
963
|
-
name: Sam
|
|
964
|
-
age: 34
|
|
965
|
-
address: Guangzhou
|
|
966
|
-
- key: "2"
|
|
967
|
-
name: Bob
|
|
968
|
-
age: 27
|
|
969
|
-
address: Hainan
|
|
970
|
-
student:
|
|
971
|
-
- key: "21"
|
|
972
|
-
name: Ava
|
|
973
|
-
age: 23
|
|
974
|
-
address: Beijing
|
|
975
|
-
- key: "22"
|
|
976
|
-
name: Sophia
|
|
977
|
-
age: 20
|
|
978
|
-
address: Shanghai
|
|
979
|
-
- key: "23"
|
|
980
|
-
name: Charlotte
|
|
981
|
-
age: 35
|
|
982
|
-
address: Chongqing
|
|
983
|
-
student:
|
|
984
|
-
- key: "231"
|
|
985
|
-
name: Mia
|
|
986
|
-
age: 18
|
|
987
|
-
address: Chengdu
|
|
988
|
-
- key: "232"
|
|
989
|
-
name: Noah
|
|
990
|
-
age: 38
|
|
991
|
-
address: Hainan
|
|
992
|
-
- key: "233"
|
|
993
|
-
name: William
|
|
994
|
-
age: 16
|
|
995
|
-
address: Taiwan
|
|
996
|
-
```
|
|
997
|
-
|
|
998
951
|
### Dynamic Columns
|
|
999
952
|
|
|
953
|
+
通过 cell 配置统一自定义单元格渲染,结合动态列实现灵活的表格展示。
|
|
954
|
+
|
|
1000
955
|
```yaml preview
|
|
1001
956
|
brick: eo-next-table
|
|
1002
957
|
properties:
|
|
@@ -1015,7 +970,6 @@ properties:
|
|
|
1015
970
|
brick: em
|
|
1016
971
|
properties:
|
|
1017
972
|
textContent: <% DATA.title %>
|
|
1018
|
-
# Dynamic columns, such as by dates
|
|
1019
973
|
columns: <% CTX.dates %>
|
|
1020
974
|
dataSource:
|
|
1021
975
|
list:
|
|
@@ -1041,7 +995,9 @@ context:
|
|
|
1041
995
|
%>
|
|
1042
996
|
```
|
|
1043
997
|
|
|
1044
|
-
### Cell
|
|
998
|
+
### Cell Status
|
|
999
|
+
|
|
1000
|
+
通过列的 cellStatus 配置,根据数据值设置单元格左边框颜色来表示状态。
|
|
1045
1001
|
|
|
1046
1002
|
```yaml preview
|
|
1047
1003
|
- brick: eo-next-table
|
|
@@ -1083,10 +1039,229 @@ context:
|
|
|
1083
1039
|
address: Shenzhen
|
|
1084
1040
|
```
|
|
1085
1041
|
|
|
1086
|
-
###
|
|
1042
|
+
### Hidden Columns
|
|
1043
|
+
|
|
1044
|
+
通过 hiddenColumns 隐藏指定列,传入对应的 column.key 即可。
|
|
1045
|
+
|
|
1046
|
+
```yaml preview
|
|
1047
|
+
- brick: eo-next-table
|
|
1048
|
+
properties:
|
|
1049
|
+
hiddenColumns:
|
|
1050
|
+
- age
|
|
1051
|
+
columns:
|
|
1052
|
+
- dataIndex: name
|
|
1053
|
+
key: name
|
|
1054
|
+
title: Name
|
|
1055
|
+
- dataIndex: age
|
|
1056
|
+
key: age
|
|
1057
|
+
title: Age
|
|
1058
|
+
- dataIndex: address
|
|
1059
|
+
key: address
|
|
1060
|
+
title: Address
|
|
1061
|
+
dataSource:
|
|
1062
|
+
list:
|
|
1063
|
+
- key: 0
|
|
1064
|
+
name: Jack
|
|
1065
|
+
age: 18
|
|
1066
|
+
address: Guangzhou
|
|
1067
|
+
- key: 1
|
|
1068
|
+
name: Alex
|
|
1069
|
+
age: 20
|
|
1070
|
+
address: Shanghai
|
|
1071
|
+
- key: 2
|
|
1072
|
+
name: Lucy
|
|
1073
|
+
age: 16
|
|
1074
|
+
address: Yunnan
|
|
1075
|
+
```
|
|
1076
|
+
|
|
1077
|
+
### Selected Row Keys
|
|
1078
|
+
|
|
1079
|
+
通过 selectedRowKeys 设置默认选中的行。
|
|
1080
|
+
|
|
1081
|
+
```yaml preview
|
|
1082
|
+
- brick: eo-next-table
|
|
1083
|
+
events:
|
|
1084
|
+
row.select:
|
|
1085
|
+
- action: console.log
|
|
1086
|
+
row.select.v2:
|
|
1087
|
+
- action: console.log
|
|
1088
|
+
properties:
|
|
1089
|
+
rowSelection: true
|
|
1090
|
+
selectedRowKeys:
|
|
1091
|
+
- 0
|
|
1092
|
+
- 2
|
|
1093
|
+
pagination: false
|
|
1094
|
+
columns:
|
|
1095
|
+
- dataIndex: name
|
|
1096
|
+
key: name
|
|
1097
|
+
title: Name
|
|
1098
|
+
- dataIndex: age
|
|
1099
|
+
key: age
|
|
1100
|
+
title: Age
|
|
1101
|
+
- dataIndex: address
|
|
1102
|
+
key: address
|
|
1103
|
+
title: Address
|
|
1104
|
+
dataSource:
|
|
1105
|
+
list:
|
|
1106
|
+
- key: 0
|
|
1107
|
+
name: Jack
|
|
1108
|
+
age: 18
|
|
1109
|
+
address: Guangzhou
|
|
1110
|
+
- key: 1
|
|
1111
|
+
name: Alex
|
|
1112
|
+
age: 20
|
|
1113
|
+
address: Shanghai
|
|
1114
|
+
- key: 2
|
|
1115
|
+
name: Lucy
|
|
1116
|
+
age: 16
|
|
1117
|
+
address: Yunnan
|
|
1118
|
+
```
|
|
1119
|
+
|
|
1120
|
+
### Expanded Row Keys
|
|
1121
|
+
|
|
1122
|
+
通过 expandedRowKeys 设置默认展开的行。
|
|
1123
|
+
|
|
1124
|
+
```yaml preview
|
|
1125
|
+
- brick: eo-next-table
|
|
1126
|
+
events:
|
|
1127
|
+
row.expand:
|
|
1128
|
+
- action: console.log
|
|
1129
|
+
expanded.rows.change:
|
|
1130
|
+
- action: console.log
|
|
1131
|
+
properties:
|
|
1132
|
+
expandedRowKeys:
|
|
1133
|
+
- 0
|
|
1134
|
+
expandable:
|
|
1135
|
+
expandedRowBrick:
|
|
1136
|
+
useBrick:
|
|
1137
|
+
brick: span
|
|
1138
|
+
properties:
|
|
1139
|
+
textContent: 展开内容
|
|
1140
|
+
pagination: false
|
|
1141
|
+
columns:
|
|
1142
|
+
- dataIndex: name
|
|
1143
|
+
key: name
|
|
1144
|
+
title: Name
|
|
1145
|
+
- dataIndex: age
|
|
1146
|
+
key: age
|
|
1147
|
+
title: Age
|
|
1148
|
+
- dataIndex: address
|
|
1149
|
+
key: address
|
|
1150
|
+
title: Address
|
|
1151
|
+
dataSource:
|
|
1152
|
+
list:
|
|
1153
|
+
- key: 0
|
|
1154
|
+
name: Jack
|
|
1155
|
+
age: 18
|
|
1156
|
+
address: Guangzhou
|
|
1157
|
+
- key: 1
|
|
1158
|
+
name: Alex
|
|
1159
|
+
age: 20
|
|
1160
|
+
address: Shanghai
|
|
1161
|
+
- key: 2
|
|
1162
|
+
name: Lucy
|
|
1163
|
+
age: 16
|
|
1164
|
+
address: Yunnan
|
|
1165
|
+
```
|
|
1166
|
+
|
|
1167
|
+
### Loading
|
|
1168
|
+
|
|
1169
|
+
显示加载中状态。
|
|
1170
|
+
|
|
1171
|
+
```yaml preview
|
|
1172
|
+
- brick: eo-next-table
|
|
1173
|
+
properties:
|
|
1174
|
+
loading: true
|
|
1175
|
+
columns:
|
|
1176
|
+
- dataIndex: name
|
|
1177
|
+
key: name
|
|
1178
|
+
title: Name
|
|
1179
|
+
- dataIndex: age
|
|
1180
|
+
key: age
|
|
1181
|
+
title: Age
|
|
1182
|
+
- dataIndex: address
|
|
1183
|
+
key: address
|
|
1184
|
+
title: Address
|
|
1185
|
+
dataSource:
|
|
1186
|
+
list:
|
|
1187
|
+
- key: 0
|
|
1188
|
+
name: Jack
|
|
1189
|
+
age: 18
|
|
1190
|
+
address: Guangzhou
|
|
1191
|
+
- key: 1
|
|
1192
|
+
name: Alex
|
|
1193
|
+
age: 20
|
|
1194
|
+
address: Shanghai
|
|
1195
|
+
```
|
|
1196
|
+
|
|
1197
|
+
### Show Header
|
|
1198
|
+
|
|
1199
|
+
通过 showHeader 控制是否显示表头。
|
|
1200
|
+
|
|
1201
|
+
```yaml preview
|
|
1202
|
+
- brick: eo-next-table
|
|
1203
|
+
properties:
|
|
1204
|
+
showHeader: false
|
|
1205
|
+
pagination: false
|
|
1206
|
+
columns:
|
|
1207
|
+
- dataIndex: name
|
|
1208
|
+
key: name
|
|
1209
|
+
title: Name
|
|
1210
|
+
- dataIndex: age
|
|
1211
|
+
key: age
|
|
1212
|
+
title: Age
|
|
1213
|
+
- dataIndex: address
|
|
1214
|
+
key: address
|
|
1215
|
+
title: Address
|
|
1216
|
+
dataSource:
|
|
1217
|
+
list:
|
|
1218
|
+
- key: 0
|
|
1219
|
+
name: Jack
|
|
1220
|
+
age: 18
|
|
1221
|
+
address: Guangzhou
|
|
1222
|
+
- key: 1
|
|
1223
|
+
name: Alex
|
|
1224
|
+
age: 20
|
|
1225
|
+
address: Shanghai
|
|
1226
|
+
```
|
|
1227
|
+
|
|
1228
|
+
### Optimized Columns
|
|
1229
|
+
|
|
1230
|
+
通过 optimizedColumns 指定需要优化渲染的列。
|
|
1231
|
+
|
|
1232
|
+
```yaml preview
|
|
1233
|
+
- brick: eo-next-table
|
|
1234
|
+
properties:
|
|
1235
|
+
optimizedColumns:
|
|
1236
|
+
- name
|
|
1237
|
+
pagination: false
|
|
1238
|
+
columns:
|
|
1239
|
+
- dataIndex: name
|
|
1240
|
+
key: name
|
|
1241
|
+
title: Name
|
|
1242
|
+
- dataIndex: age
|
|
1243
|
+
key: age
|
|
1244
|
+
title: Age
|
|
1245
|
+
- dataIndex: address
|
|
1246
|
+
key: address
|
|
1247
|
+
title: Address
|
|
1248
|
+
dataSource:
|
|
1249
|
+
list:
|
|
1250
|
+
- key: 0
|
|
1251
|
+
name: Jack
|
|
1252
|
+
age: 18
|
|
1253
|
+
address: Guangzhou
|
|
1254
|
+
- key: 1
|
|
1255
|
+
name: Alex
|
|
1256
|
+
age: 20
|
|
1257
|
+
address: Shanghai
|
|
1258
|
+
```
|
|
1259
|
+
|
|
1260
|
+
### Theme Variant Elevo
|
|
1261
|
+
|
|
1262
|
+
使用 themeVariant 为表格设置 elevo 主题样式。
|
|
1087
1263
|
|
|
1088
1264
|
```yaml preview
|
|
1089
|
-
# Use this container to emulate background
|
|
1090
1265
|
brick: ai-portal.home-container
|
|
1091
1266
|
properties:
|
|
1092
1267
|
style:
|