Skip to content

Commit d7a124c

Browse files
authored
docs: update tree-select doc and fix typo (#4766)
* docs: update tree-select doc and fix typo * docs(tree-select): fix fieldNames description
1 parent f0f7178 commit d7a124c

File tree

6 files changed

+14
-10
lines changed

6 files changed

+14
-10
lines changed

CHANGELOG.en-US.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
- `Collapse` added `ghost`, `collapsible`
5858
- `Popconfirm` added `cancelButton`, `okButton`, and `esc` button hiding
5959
- `ConfigProvider` added ConfigProvider.config to define the configuration of `Modal.xxx` `message` `notification`
60-
- `Tree` `TreeSlelct`
60+
- `Tree` `TreeSelect`
6161

6262
- Added virtual scrolling, discarded using `a-tree-node` `a-tree-select-node` to build nodes, using `treeData` property instead to improve component performance
6363
- Deprecated `scopedSlots` `slots` custom rendering node, and replace it with `v-slot:title` to improve ease of use, avoid slot configuration expansion, and also avoid slot conflicts

CHANGELOG.zh-CN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
- `Collapse` 新增 `ghost``collapsible`
5858
- `Popconfirm` 新增 `cancelButton``okButton`, 以及 `esc` 按键隐藏
5959
- `ConfigProvider` 新增 ConfigProvider.config,定义 `Modal.xxx` `message` `notification` 的配置
60-
- `Tree` `TreeSlelct`
60+
- `Tree` `TreeSelect`
6161

6262
- 新增了虚拟滚动,废弃使用 `a-tree-node` `a-tree-select-node` 构建节点,使用 `treeData` 属性替代,提升组件性能
6363
- 废弃 `scopedSlots` `slots` 自定义渲染节点,使用 `v-slot:title` 替换,提升易用性,避免插槽配置膨胀,同时也避免了插槽冲突问题

components/tree-select/index.en-US.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ Tree selection control.
4141
| treeCheckable | Whether to show checkbox on the treeNodes | boolean | false | |
4242
| treeCheckStrictly | Whether to check nodes precisely (in the `checkable` mode), means parent and child nodes are not associated, and it will make `labelInValue` be true | boolean | false | |
4343
| treeData | Data of the treeNodes, manual construction work is no longer needed if this property has been set(ensure the Uniqueness of each value) | array\<{ value, title, children, \[disabled, disableCheckbox, selectable] }> | \[] | |
44-
| replaceFields | Replace the title,value, key and children fields in treeNode with the corresponding fields in treeData | object | { children:'children', title:'title', key:'key', value: 'value' } | | 1.6.1 |
44+
| replaceFields | Replace the title,value, key and children fields in treeNode with the corresponding fields in treeData | object | { children:'children', label:'title', key:'key', value: 'value' } | | 1.6.1 (3.0.0 deprecated) |
45+
| fieldNames | Replace the title,value, key and children fields in treeNode with the corresponding fields in treeData | object | {children:'children', label:'title', key:'key', value: 'value' } | | 3.0.0 |
4546
| treeDataSimpleMode | Enable simple mode of treeData. Changes the `treeData` schema to: \[{id:1, pId:0, value:'1', title:"test1",...},...] where pId is parent node's id). It is possible to replace the default `id` and `pId` keys by providing object to `treeDataSimpleMode` | false\|object\<{ id: string, pId: string, rootPId: null }> | false | |
4647
| treeDefaultExpandAll | Whether to expand all treeNodes by default | boolean | false | |
4748
| treeDefaultExpandedKeys | Default expanded treeNodes | string\[] \| number\[] | - | |

components/tree-select/index.zh-CN.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ cover: https://gw.alipayobjects.com/zos/alicdn/Ax4DA0njr/TreeSelect.svg
4242
| treeCheckable | 显示 checkbox | boolean | false | |
4343
| treeCheckStrictly | checkable 状态下节点选择完全受控(父子节点选中状态不再关联),会使得 `labelInValue` 强制为 true | boolean | false | |
4444
| treeData | treeNodes 数据,如果设置则不需要手动构造 TreeNode 节点(value 在整个树范围内唯一) | array&lt;{value, label, children, [disabled, disableCheckbox, selectable]}> | \[] | |
45-
| replaceFields | 替换 treeNode 中 title,value,key,children 字段为 treeData 中对应的字段 | object | {children:'children', title:'title', key:'key', value: 'value' } | | 1.6.1 |
45+
| replaceFields | 替换 treeNode 中 title,value,key,children 字段为 treeData 中对应的字段 | object | {children:'children', label:'title', key:'key', value: 'value' } | | 1.6.1 (3.0.0 废弃) |
46+
| fieldNames | 替换 treeNode 中 title,value,key,children 字段为 treeData 中对应的字段 | object | {children:'children', label:'title', key:'key', value: 'value' } | | 3.0.0 |
4647
| treeDataSimpleMode | 使用简单格式的 treeData,具体设置参考可设置的类型 (此时 treeData 应变为这样的数据结构: \[{id:1, pId:0, value:'1', label:"test1",...},...], `pId` 是父节点的 id) | false\|Array&lt;{ id: string, pId: string, rootPId: null }> | false | |
4748
| treeDefaultExpandAll | 默认展开所有树节点 | boolean | false | |
4849
| treeDefaultExpandedKeys | 默认展开的树节点 | string\[] \| number\[] | - | |

site/src/vueDocs/migration-v3.en-US.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ The 2.x version is a compatible version developed for compatibility with Vue 3.
2222
- Removed the `combobox` mode of Select, please use `AutoComplete` instead.
2323
- Deprecated Button.Group, please use `Space` instead.
2424
- `DatePicker` `TimePicker` `Calendar` remove momentjs, please use dayjs instead
25-
- `Tree`, `TreeSlelct`
25+
- `Tree`, `TreeSelect`
2626
- Deprecated the use of `a-tree-node` and `a-tree-select-node` to construct nodes, use the `treeData` property instead
2727
- Deprecated `scopedSlots` `slots` custom rendering node, use `v-slot:title` instead
28+
- Deprecated `replaceFields`, use `fieldNames` instead
2829
- `Table`
2930
- Removed the `rowSelection.hideDefaultSelections` property of Table, please use `SELECTION_ALL` and `SELECTION_INVERT` in `rowSelection.selections` instead, [custom options](/components/table/#components-table-demo- row-selection-custom).
3031
- Removed Column slots and replaced them with `v-slot:headerCell` `v-slot:headerCell` `v-slot:bodyCell` `v-slot:customFilterDropdown` `v-slot:customFilterIcon`
@@ -33,9 +34,9 @@ The 2.x version is a compatible version developed for compatibility with Vue 3.
3334

3435
In order to make the components have better performance and maintainability, we have used TS + Composition Api to refactor almost all components. There are still very few components that have not been refactored. Such components will be refactored gradually in the future, and the rest There will be no destructive updates to the components, so there is no need to worry about future upgrade costs.
3536

36-
Major updates after the 3.0 version refactoring include `Tree` `TreeSlelct` `DatePicker` `TimePicker` `Calendar` `Form` `Table`, other components also have corresponding function updates, you can check ChangeLog for further details
37+
Major updates after the 3.0 version refactoring include `Tree` `TreeSelect` `DatePicker` `TimePicker` `Calendar` `Form` `Table`, other components also have corresponding function updates, you can check ChangeLog for further details
3738

38-
- `Tree` `TreeSlelct`
39+
- `Tree` `TreeSelect`
3940

4041
- Added virtual scrolling, discarded using `a-tree-node` `a-tree-select-node` to build nodes, using `treeData` property instead to improve component performance
4142
- Deprecated `scopedSlots` `slots` custom rendering node, and replace it with `v-slot:title` to improve ease of use, avoid slot configuration expansion, and also avoid slot conflicts

site/src/vueDocs/migration-v3.zh-CN.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@
2323
- 移除了 Select 的 `combobox` 模式,请使用 `AutoComplete` 替代。
2424
- 废弃 Button.Group,请使用 `Space` 代替。
2525
- `DatePicker` `TimePicker` `Calendar` 移除 momentjs,请使用 dayjs 替换
26-
- `Tree``TreeSlelct`
26+
- `Tree``TreeSelect`
2727
- 废弃使用 `a-tree-node` `a-tree-select-node` 构建节点,使用 `treeData` 属性替代
2828
- 废弃 `scopedSlots` `slots` 自定义渲染节点,使用 `v-slot:title` 替换
29+
- 废弃 `replaceFields` , 使用 `fieldNames` 替换
2930
- `Table`
3031
- 移除了 Table 的 `rowSelection.hideDefaultSelections` 属性,请在 `rowSelection.selections` 中使用 `SELECTION_ALL``SELECTION_INVERT` 替代,[自定义选择项](/components/table/#components-table-demo-row-selection-custom)
3132
- 移除了 Column slots,分别使用 `v-slot:headerCell` `v-slot:headerCell` `v-slot:bodyCell` `v-slot:customFilterDropdown` `v-slot:customFilterIcon` 替换
@@ -34,9 +35,9 @@
3435

3536
为了让组件拥有更好的性能和可维护性,我们几乎使用 TS + Composition Api 重构了所有组件,目前还有极个别的组件没有重构,这类组件会在接下来逐步重构,剩余的组件不会有破坏性更新,所以不用担心未来的升级成本。
3637

37-
3.0 版本重构后较大的更新有 `Tree` `TreeSlelct` `DatePicker` `TimePicker` `Calendar` `Form` `Table`,其它组件也有相应功能的更新,你可以查看 ChangeLog 进一步了解详情
38+
3.0 版本重构后较大的更新有 `Tree` `TreeSelect` `DatePicker` `TimePicker` `Calendar` `Form` `Table`,其它组件也有相应功能的更新,你可以查看 ChangeLog 进一步了解详情
3839

39-
- `Tree` `TreeSlelct`
40+
- `Tree` `TreeSelect`
4041

4142
- 新增了虚拟滚动,废弃使用 `a-tree-node` `a-tree-select-node` 构建节点,使用 `treeData` 属性替代,提升组件性能
4243
- 废弃 `scopedSlots` `slots` 自定义渲染节点,使用 `v-slot:title` 替换,提升易用性,避免插槽配置膨胀,同时也避免了插槽冲突问题

0 commit comments

Comments
 (0)