From 51c08b7e62d511546187fc54d2b879b68e4e5558 Mon Sep 17 00:00:00 2001 From: Javey Date: Wed, 28 Aug 2024 10:56:51 +0800 Subject: [PATCH] docs: update some docs [skip ci] --- components/table/demos/asyncTree.md | 3 +++ components/table/demos/tree.md | 4 +++- components/tree/demos/loading.md | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/components/table/demos/asyncTree.md b/components/table/demos/asyncTree.md index dddd73a5d..8bda4e7b1 100644 --- a/components/table/demos/asyncTree.md +++ b/components/table/demos/asyncTree.md @@ -10,6 +10,9 @@ order: 33 组件默认遇到`children`为`[]`空数组的情况就会去进行异步加载,你可以通过`loaded`属性设为`true`来 标识该子节点已经加载完成,无需再次加载 +> 组件在该行数据异步加载完成后,会往原始数据上自动添加`loaded=true`。你也可以手动指定某行数据 +> `loaded=true`,这样即使组件发现该行数据`children`为空`[]`,也不会去加载了 + ```vdt import {Table, TableColumn} from 'kpc'; diff --git a/components/table/demos/tree.md b/components/table/demos/tree.md index f8c1d6b85..135cf5cbf 100644 --- a/components/table/demos/tree.md +++ b/components/table/demos/tree.md @@ -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'; diff --git a/components/tree/demos/loading.md b/components/tree/demos/loading.md index f0bead6dc..f734689b1 100644 --- a/components/tree/demos/loading.md +++ b/components/tree/demos/loading.md @@ -10,6 +10,9 @@ order: 1.2 组件默认遇到`children`为`[]`空数组的情况就会去进行异步加载,你可以通过`loaded`属性设为`true`来 标识该子节点已经加载完成,无需再次加载 +> 组件在该节点数据异步加载完成后,会往原始数据上自动添加`loaded=true`。你也可以手动指定该节点数据 +> `loaded=true`,这样即使组件发现该节点数据`children`为空`[]`,也不会去加载了 + ```vdt import {Tree} from 'kpc';