Skip to content

Commit

Permalink
docs: update some docs [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
Javey committed Aug 28, 2024
1 parent 0058c97 commit 51c08b7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions components/table/demos/asyncTree.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ order: 33
组件默认遇到`children``[]`空数组的情况就会去进行异步加载,你可以通过`loaded`属性设为`true`
标识该子节点已经加载完成,无需再次加载

> 组件在该行数据异步加载完成后,会往原始数据上自动添加`loaded=true`。你也可以手动指定某行数据
> `loaded=true`,这样即使组件发现该行数据`children`为空`[]`,也不会去加载了
```vdt
import {Table, TableColumn} from 'kpc';
Expand Down
4 changes: 3 additions & 1 deletion components/table/demos/tree.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ order: 24

树形表格下,必须通过`rowKey`指定每行的`key`

> 如果数据中恰好存在`children`字段,但是你又不想展示树形表格,将`childrenKey`设为`false`即可
> 如果数据中恰好存在`children`字段,但是你又不想展示树形表格,将`childrenKey`设为`false`即可。
> 假如你的数据为:`{name: 'xxx', books: [{name: 'a'}, {name: 'b'}]}`,想把books展示成子树,
> 可以指定`childrenKey="books"`
```vdt
import {Table, TableColumn} from 'kpc';
Expand Down
3 changes: 3 additions & 0 deletions components/tree/demos/loading.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ order: 1.2
组件默认遇到`children``[]`空数组的情况就会去进行异步加载,你可以通过`loaded`属性设为`true`
标识该子节点已经加载完成,无需再次加载

> 组件在该节点数据异步加载完成后,会往原始数据上自动添加`loaded=true`。你也可以手动指定该节点数据
> `loaded=true`,这样即使组件发现该节点数据`children`为空`[]`,也不会去加载了
```vdt
import {Tree} from 'kpc';
Expand Down

0 comments on commit 51c08b7

Please sign in to comment.