Skip to content

Commit 81f9cb8

Browse files
committed
docs: table 代码案例
1 parent 56c464e commit 81f9cb8

1 file changed

Lines changed: 5 additions & 11 deletions

File tree

docs/components/ArrayTables.md

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,23 @@
88

99
> 由于目前 tdesign 的 table 暂时不支持设置 rowKey 为一个函数,所以需要为数据制定一个唯一的 key, 这个 key 不能是表单项的 name, table 内部会用数据项的 index 作为 key 的值。
1010
11-
```tsx | pure
12-
<SchemaField.Array
13-
name="array"
14-
x-decorator="FormItem"
15-
x-component="ArrayTable"
16-
x-component-props={{
17-
rowKey: 'rowKey',
18-
}}
19-
>
11+
```html | pure
12+
<SchemaField.Array name="array" x-decorator="FormItem" x-component="ArrayTable"
13+
x-component-props={{ rowKey: 'rowKey', }} />
2014
```
2115

2216
## 排序
2317

2418
> 制定 Column 的 dataIndex 字段为 drag, ArrayTable.SortHandle 只是一个默认图标,可以替换
2519
26-
```tsx | pure
20+
```html
2721
<SchemaField.Void
2822
x-component="ArrayTable.Column"
2923
x-component-props={{
3024
width: 80,
3125
title: 'Sort',
3226
dataIndex: 'drag',
33-
align: 'center',
27+
align: 'center'
3428
}}
3529
>
3630
<SchemaField.Void

0 commit comments

Comments
 (0)