docs: update tree-select doc and fix typo (#4766)

* docs: update tree-select doc and fix typo

* docs(tree-select): fix fieldNames description
This commit is contained in:
zkwolf 2021-10-18 16:18:42 +08:00 committed by GitHub
parent f0f71787c7
commit d7a124c59d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 14 additions and 10 deletions

View File

@ -57,7 +57,7 @@
- `Collapse` added `ghost`, `collapsible` - `Collapse` added `ghost`, `collapsible`
- `Popconfirm` added `cancelButton`, `okButton`, and `esc` button hiding - `Popconfirm` added `cancelButton`, `okButton`, and `esc` button hiding
- `ConfigProvider` added ConfigProvider.config to define the configuration of `Modal.xxx` `message` `notification` - `ConfigProvider` added ConfigProvider.config to define the configuration of `Modal.xxx` `message` `notification`
- `Tree` `TreeSlelct` - `Tree` `TreeSelect`
- Added virtual scrolling, discarded using `a-tree-node` `a-tree-select-node` to build nodes, using `treeData` property instead to improve component performance - Added virtual scrolling, discarded using `a-tree-node` `a-tree-select-node` to build nodes, using `treeData` property instead to improve component performance
- 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 - 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

View File

@ -57,7 +57,7 @@
- `Collapse` 新增 `ghost`、`collapsible` - `Collapse` 新增 `ghost`、`collapsible`
- `Popconfirm` 新增 `cancelButton`、`okButton`, 以及 `esc` 按键隐藏 - `Popconfirm` 新增 `cancelButton`、`okButton`, 以及 `esc` 按键隐藏
- `ConfigProvider` 新增 ConfigProvider.config定义 `Modal.xxx` `message` `notification` 的配置 - `ConfigProvider` 新增 ConfigProvider.config定义 `Modal.xxx` `message` `notification` 的配置
- `Tree` `TreeSlelct` - `Tree` `TreeSelect`
- 新增了虚拟滚动,废弃使用 `a-tree-node` `a-tree-select-node` 构建节点,使用 `treeData` 属性替代,提升组件性能 - 新增了虚拟滚动,废弃使用 `a-tree-node` `a-tree-select-node` 构建节点,使用 `treeData` 属性替代,提升组件性能
- 废弃 `scopedSlots` `slots` 自定义渲染节点,使用 `v-slot:title` 替换,提升易用性,避免插槽配置膨胀,同时也避免了插槽冲突问题 - 废弃 `scopedSlots` `slots` 自定义渲染节点,使用 `v-slot:title` 替换,提升易用性,避免插槽配置膨胀,同时也避免了插槽冲突问题

View File

@ -41,7 +41,8 @@ Tree selection control.
| treeCheckable | Whether to show checkbox on the treeNodes | boolean | false | | | treeCheckable | Whether to show checkbox on the treeNodes | boolean | false | |
| 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 | | | 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 | |
| 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] }> | \[] | | | 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] }> | \[] | |
| 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 | | 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) |
| 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 |
| 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 | | | 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 | |
| treeDefaultExpandAll | Whether to expand all treeNodes by default | boolean | false | | | treeDefaultExpandAll | Whether to expand all treeNodes by default | boolean | false | |
| treeDefaultExpandedKeys | Default expanded treeNodes | string\[] \| number\[] | - | | | treeDefaultExpandedKeys | Default expanded treeNodes | string\[] \| number\[] | - | |

View File

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

View File

@ -22,9 +22,10 @@ The 2.x version is a compatible version developed for compatibility with Vue 3.
- Removed the `combobox` mode of Select, please use `AutoComplete` instead. - Removed the `combobox` mode of Select, please use `AutoComplete` instead.
- Deprecated Button.Group, please use `Space` instead. - Deprecated Button.Group, please use `Space` instead.
- `DatePicker` `TimePicker` `Calendar` remove momentjs, please use dayjs instead - `DatePicker` `TimePicker` `Calendar` remove momentjs, please use dayjs instead
- `Tree`, `TreeSlelct` - `Tree`, `TreeSelect`
- Deprecated the use of `a-tree-node` and `a-tree-select-node` to construct nodes, use the `treeData` property instead - Deprecated the use of `a-tree-node` and `a-tree-select-node` to construct nodes, use the `treeData` property instead
- Deprecated `scopedSlots` `slots` custom rendering node, use `v-slot:title` instead - Deprecated `scopedSlots` `slots` custom rendering node, use `v-slot:title` instead
- Deprecated `replaceFields`, use `fieldNames` instead
- `Table` - `Table`
- 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). - 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).
- Removed Column slots and replaced them with `v-slot:headerCell` `v-slot:headerCell` `v-slot:bodyCell` `v-slot:customFilterDropdown` `v-slot:customFilterIcon` - 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.
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. 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.
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 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
- `Tree` `TreeSlelct` - `Tree` `TreeSelect`
- Added virtual scrolling, discarded using `a-tree-node` `a-tree-select-node` to build nodes, using `treeData` property instead to improve component performance - Added virtual scrolling, discarded using `a-tree-node` `a-tree-select-node` to build nodes, using `treeData` property instead to improve component performance
- 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 - 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

View File

@ -23,9 +23,10 @@
- 移除了 Select 的 `combobox` 模式,请使用 `AutoComplete` 替代。 - 移除了 Select 的 `combobox` 模式,请使用 `AutoComplete` 替代。
- 废弃 Button.Group请使用 `Space` 代替。 - 废弃 Button.Group请使用 `Space` 代替。
- `DatePicker` `TimePicker` `Calendar` 移除 momentjs请使用 dayjs 替换 - `DatePicker` `TimePicker` `Calendar` 移除 momentjs请使用 dayjs 替换
- `Tree`、`TreeSlelct` - `Tree`、`TreeSelect`
- 废弃使用 `a-tree-node` `a-tree-select-node` 构建节点,使用 `treeData` 属性替代 - 废弃使用 `a-tree-node` `a-tree-select-node` 构建节点,使用 `treeData` 属性替代
- 废弃 `scopedSlots` `slots` 自定义渲染节点,使用 `v-slot:title` 替换 - 废弃 `scopedSlots` `slots` 自定义渲染节点,使用 `v-slot:title` 替换
- 废弃 `replaceFields` , 使用 `fieldNames` 替换
- `Table` - `Table`
- 移除了 Table 的 `rowSelection.hideDefaultSelections` 属性,请在 `rowSelection.selections` 中使用 `SELECTION_ALL``SELECTION_INVERT` 替代,[自定义选择项](/components/table/#components-table-demo-row-selection-custom)。 - 移除了 Table 的 `rowSelection.hideDefaultSelections` 属性,请在 `rowSelection.selections` 中使用 `SELECTION_ALL``SELECTION_INVERT` 替代,[自定义选择项](/components/table/#components-table-demo-row-selection-custom)。
- 移除了 Column slots分别使用 `v-slot:headerCell` `v-slot:headerCell` `v-slot:bodyCell` `v-slot:customFilterDropdown` `v-slot:customFilterIcon` 替换 - 移除了 Column slots分别使用 `v-slot:headerCell` `v-slot:headerCell` `v-slot:bodyCell` `v-slot:customFilterDropdown` `v-slot:customFilterIcon` 替换
@ -34,9 +35,9 @@
为了让组件拥有更好的性能和可维护性,我们几乎使用 TS + Composition Api 重构了所有组件,目前还有极个别的组件没有重构,这类组件会在接下来逐步重构,剩余的组件不会有破坏性更新,所以不用担心未来的升级成本。 为了让组件拥有更好的性能和可维护性,我们几乎使用 TS + Composition Api 重构了所有组件,目前还有极个别的组件没有重构,这类组件会在接下来逐步重构,剩余的组件不会有破坏性更新,所以不用担心未来的升级成本。
3.0 版本重构后较大的更新有 `Tree` `TreeSlelct` `DatePicker` `TimePicker` `Calendar` `Form` `Table`,其它组件也有相应功能的更新,你可以查看 ChangeLog 进一步了解详情 3.0 版本重构后较大的更新有 `Tree` `TreeSelect` `DatePicker` `TimePicker` `Calendar` `Form` `Table`,其它组件也有相应功能的更新,你可以查看 ChangeLog 进一步了解详情
- `Tree` `TreeSlelct` - `Tree` `TreeSelect`
- 新增了虚拟滚动,废弃使用 `a-tree-node` `a-tree-select-node` 构建节点,使用 `treeData` 属性替代,提升组件性能 - 新增了虚拟滚动,废弃使用 `a-tree-node` `a-tree-select-node` 构建节点,使用 `treeData` 属性替代,提升组件性能
- 废弃 `scopedSlots` `slots` 自定义渲染节点,使用 `v-slot:title` 替换,提升易用性,避免插槽配置膨胀,同时也避免了插槽冲突问题 - 废弃 `scopedSlots` `slots` 自定义渲染节点,使用 `v-slot:title` 替换,提升易用性,避免插槽配置膨胀,同时也避免了插槽冲突问题