diff --git a/docs/web/api/tree.en-US.md b/docs/web/api/tree.en-US.md index 8d028f3bf5..875195557a 100644 --- a/docs/web/api/tree.en-US.md +++ b/docs/web/api/tree.en-US.md @@ -111,3 +111,11 @@ Connects parent nodes in the tree with their child nodes at the same level. This ### Why doesn't the `onChange` callback return the value of the parent node when child node is selected in `valueMode = 'all'` mode? In `valueMode = 'all'` mode, the parent node will only appear in the selected values if all its child nodes are selected. + +### Why do other nodes get selected when I select a node? + +The `value` field of each item in the `data` array provided to the `Tree` component must be unique to avoid multiple selection issues caused by duplicate indices. + +### Why can't I expand nodes correctly even though I set `expanded`? + +The `value` field of each item in the `data` array provided to the `Tree` component must be unique to avoid incorrect expansion caused by duplicate indices. \ No newline at end of file diff --git a/docs/web/api/tree.md b/docs/web/api/tree.md index 9cdb4f3ed1..07f3be17a5 100644 --- a/docs/web/api/tree.md +++ b/docs/web/api/tree.md @@ -115,3 +115,11 @@ spline: data ### 为什么在 `valueMode = 'all'` 模式下,选中子节点时 `onChange` 回调并没有返回父节点的值? 在 `valueMode = 'all'` 模式下,必须当前子节点被全部选中后,父节点才会出现在选中值里面。 + +### 为什么我选中了一个选中了一个节点,但是其他节点也有被选中的情况? + +提供给 `Tree` 组件的数组 `data` 数据中的每个 `value` 字段的值必须是唯一的,避免重复索引导致多选问题。 + +### 为什么我设置了 `expanded` 却不能正确展开节点? + +提供给 `Tree` 组件的数组 `data` 数据中的每个 `value` 字段的值必须是唯一的,避免重复索引导致不能正确展开。