From 1d33c51d24b8b7d3d3eb3f8da27d567ac1ac3f4e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=B0=8F=E5=8F=AE=E5=BD=93?=
<43645580+yangzheli@users.noreply.github.com>
Date: Thu, 30 Dec 2021 09:29:29 +0800
Subject: [PATCH] docs: fix typos and uniform punctuation in migration v3
(#5098)
---
CHANGELOG.en-US.md | 48 ++++++++++++-------------
CHANGELOG.zh-CN.md | 48 ++++++++++++-------------
site/src/vueDocs/migration-v3.en-US.md | 48 ++++++++++++-------------
site/src/vueDocs/migration-v3.zh-CN.md | 50 +++++++++++++-------------
4 files changed, 93 insertions(+), 101 deletions(-)
diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md
index 3fbe2d379..ecf6c54aa 100644
--- a/CHANGELOG.en-US.md
+++ b/CHANGELOG.en-US.md
@@ -240,51 +240,49 @@ Github:[https://github.com/surely-vue/table]
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
-- Open source documentation
+- Open source documentation.
- Removed the `lazy` attribute of Transfer, it does not have a real optimization effect.
- Removed the `combobox` mode of Select, please use `AutoComplete` instead.
- Deprecated Button.Group, please use `Space` instead.
-- `Timeline.Item` new label
-- `Steps` added `responsive`, `percent`
-- `Collapse` added `ghost`, `collapsible`
-- `Popconfirm` added `cancelButton`, `okButton`, and `esc` button hiding
-- `ConfigProvider` added ConfigProvider.config to define the configuration of `Modal.xxx` `message` `notification`
-- `Tree` `TreeSelect`
+- `Timeline.Item` new label.
+- `Steps` added `responsive`, `percent`.
+- `Collapse` added `ghost`, `collapsible`.
+- `Popconfirm` added `cancelButton`, `okButton`, and `esc` button hiding.
+- `ConfigProvider` added ConfigProvider.config to define the configuration of `Modal.xxx` `message` `notification`.
+- `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
- - 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
+ - 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.
- `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 Column slots and replaced them with `v-slot:headerCell` `v-slot:headerCell` `v-slot:bodyCell` `v-slot:customFilterDropdown` `v-slot:customFilterIcon` to improve ease of use , To avoid slot configuration expansion, but also to avoid the problem of slot conflicts
- - Added expandFixed to control whether the expanded icon is fixed
+ - Removed Column slots and replaced them with `v-slot:headerCell` `v-slot:headerCell` `v-slot:bodyCell` `v-slot:customFilterDropdown` `v-slot:customFilterIcon` to improve ease of use , To avoid slot configuration expansion, but also to avoid the problem of slot conflicts.
+ - Added expandFixed to control whether the expanded icon is fixed.
- Added the showSorterTooltip header whether to display the tooltip for the next sort.
- - Added sticky for setting sticky head and scroll bar
- - Added rowExpandable to set whether to allow row expansion
- - New slot headerCell is used to personalize the header cell
- - Added slot bodyCell for personalized cell
- - New slot customFilterDropdown is used to customize the filter menu, which needs to be used with `column.customFilterDropdown`
- - Added slot customFilterIcon for custom filter icons
- - New slot emptyText is used to customize the display content of empty data
- - Added slot summary for the summary column
+ - Added sticky for setting sticky head and scroll bar.
+ - Added rowExpandable to set whether to allow row expansion.
+ - New slot headerCell is used to personalize the header cell.
+ - Added slot bodyCell for personalized cell.
+ - New slot customFilterDropdown is used to customize the filter menu, which needs to be used with `column.customFilterDropdown`.
+ - Added slot customFilterIcon for custom filter icons.
+ - New slot emptyText is used to customize the display content of empty data.
+ - Added slot summary for the summary column.
- `DatePicker` `TimePicker` `Calendar`
- By default, a more lightweight dayjs is used to replace momentjs. If your project is too large and uses a lot of momentjs methods, you can refer to the document [Custom Time Library](/docs/vue/replace-date-cn), Replace with momentjs.
- - UI interaction adjustment, align with antd 4.x interaction specifications
+ - UI interaction adjustment, align with antd 4.x interaction specifications.
- `Form` The main goal of this update is to improve performance. If you don't have custom form controls, you can almost ignore this part
- Since version 3.0, Form.Item no longer hijacks child elements, but automatically checks through provider/inject dependency injection. This method can improve component performance, and there is no limit to the number of child elements. The same is true for child elements. It can be a high-level component that is further encapsulated.
- You can reference [Customized Form Controls](#components-form-demo-customized-form-controls)
-
- But it also has some disadvantages:
+ You can reference [Customized Form Controls](#components-form-demo-customized-form-controls), but it also has some disadvantages:
1. If the custom component wants Form.Item to be verified and displayed, you need to inject `const {id, onFieldChange, onFieldBlur} = useFormItemContext()` and call the corresponding method.
- 2. A Form.Item can only collect the data of one form item. If there are multiple form items, it will cause collection confusion, for example,
+ 2. A Form.Item can only collect the data of one form item. If there are multiple form items, it will cause collection confusion. For example,
```html
@@ -293,7 +291,7 @@ Github:[https://github.com/surely-vue/table]
```
- As above Form.Item does not know whether to collect `name="a"` or `name=`b``, you can solve this kind of problem in the following two ways:
+ As above Form.Item does not know whether to collect `name="a"` or `name="b"`, you can solve this kind of problem in the following two ways:
The first is to use multiple `a-form-item`:
diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md
index 841c02b87..721d03421 100644
--- a/CHANGELOG.zh-CN.md
+++ b/CHANGELOG.zh-CN.md
@@ -239,49 +239,47 @@ Github:[https://github.com/surely-vue/table]
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
-- 文档开源,如果您的公司不能外网访问,可以私有化部署,但不可以传播,不可以商业化
+- 文档开源,如果您的公司不能外网访问,可以私有化部署,但不可以传播,不可以商业化。
- 移除了 Transfer 的 `lazy` 属性,它并没有起到真正的优化效果。
- 移除了 Select 的 `combobox` 模式,请使用 `AutoComplete` 替代。
- 废弃 Button.Group,请使用 `Space` 代替。
-- `Timeline.Item` 新增 label
-- `Steps` 新增 `responsive`、`percent`
-- `Collapse` 新增 `ghost`、`collapsible`
-- `Popconfirm` 新增 `cancelButton`、`okButton`, 以及 `esc` 按键隐藏
-- `ConfigProvider` 新增 ConfigProvider.config,定义 `Modal.xxx` `message` `notification` 的配置
+- `Timeline.Item` 新增 label。
+- `Steps` 新增 `responsive`、`percent`。
+- `Collapse` 新增 `ghost`、`collapsible`。
+- `Popconfirm` 新增 `cancelButton`、`okButton`, 以及 `esc` 按键隐藏。
+- `ConfigProvider` 新增 ConfigProvider.config,定义 `Modal.xxx` `message` `notification` 的配置。
- `Tree` `TreeSelect`
- - 新增了虚拟滚动,废弃使用 `a-tree-node` `a-tree-select-node` 构建节点,使用 `treeData` 属性替代,提升组件性能
- - 废弃 `scopedSlots` `slots` 自定义渲染节点,使用 `v-slot:title` 替换,提升易用性,避免插槽配置膨胀,同时也避免了插槽冲突问题
+ - 新增了虚拟滚动,废弃使用 `a-tree-node` `a-tree-select-node` 构建节点,使用 `treeData` 属性替代,提升组件性能。
+ - 废弃 `scopedSlots` `slots` 自定义渲染节点,使用 `v-slot:title` 替换,提升易用性,避免插槽配置膨胀,同时也避免了插槽冲突问题。
- `Table`
- 移除了 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` 替换,提升易用性,避免插槽配置膨胀,同时也避免了插槽冲突问题
- - 新增 expandFixed 控制展开图标是否固定
+ - 移除了 Column slots,分别使用 `v-slot:headerCell` `v-slot:headerCell` `v-slot:bodyCell` `v-slot:customFilterDropdown` `v-slot:customFilterIcon` 替换,提升易用性,避免插槽配置膨胀,同时也避免了插槽冲突问题。
+ - 新增 expandFixed 控制展开图标是否固定。
- 新增 showSorterTooltip 表头是否显示下一次排序的 tooltip 提示。
- - 新增 sticky 用于设置粘性头部和滚动条
- - 新增 rowExpandable 用于设置是否允许行展开
- - 新增插槽 headerCell 用于个性化头部单元格
- - 新增插槽 bodyCell 用于个性化单元格
- - 新增插槽 customFilterDropdown 用于自定义筛选菜单,需要配合 `column.customFilterDropdown` 使用
- - 新增插槽 customFilterIcon 用于自定义筛选图标
- - 新增插槽 emptyText 用于自定义空数据时的显示内容
- - 新增插槽 summary 用于总结栏
+ - 新增 sticky 用于设置粘性头部和滚动条。
+ - 新增 rowExpandable 用于设置是否允许行展开。
+ - 新增插槽 headerCell 用于个性化头部单元格。
+ - 新增插槽 bodyCell 用于个性化单元格。
+ - 新增插槽 customFilterDropdown 用于自定义筛选菜单,需要配合 `column.customFilterDropdown` 使用。
+ - 新增插槽 customFilterIcon 用于自定义筛选图标。
+ - 新增插槽 emptyText 用于自定义空数据时的显示内容。
+ - 新增插槽 summary 用于总结栏。
- `DatePicker` `TimePicker` `Calendar`
- 默认使用更加轻量级的 dayjs 替换 momentjs,如果你的项目过大,使用了大量的 momentjs 的方法,你可以参考文档[自定义时间库](/docs/vue/replace-date-cn),替换成 momentjs。
- - UI 交互调整,对齐 antd 4.x 交互规范
+ - UI 交互调整,对齐 antd 4.x 交互规范。
- `Form` 这次更新主要目标是提升性能,如果你没有自定义表单控件,几乎可以忽略该部分
- - 自 3.0 版本以后,Form.Item 不再劫持子元素,而是通过 provider / inject 依赖注入的方式进行自动校验,这种方式可以提高组件性能,子元素也不会限制个数,同样子元素也可以是进一步封装的高级组件。你可以参考[自定义表单控件示例](#components-form-demo-customized-form-controls)
-
- 但它同样会有一些缺点:
+ - 自 3.0 版本以后,Form.Item 不再劫持子元素,而是通过 provider / inject 依赖注入的方式进行自动校验,这种方式可以提高组件性能,子元素也不会限制个数,同样子元素也可以是进一步封装的高级组件。你可以参考[自定义表单控件示例](#components-form-demo-customized-form-controls),但它同样会有一些缺点:
1、自定义组件如果希望 Form.Item 进行校验展示,你需要 `const {id, onFieldChange, onFieldBlur} = useFormItemContext()` 注入,并调用相应的方法。
- 2、一个 Form.Item 只能收集一个表单项的数据,如果有多个表单项,会导致收集错乱,例如,
+ 2、一个 Form.Item 只能收集一个表单项的数据,如果有多个表单项,会导致收集错乱。例如:
```html
@@ -290,7 +288,7 @@ Github:[https://github.com/surely-vue/table]
```
- 如上 Form.Item 并不知道需要收集 `name="a"` 还是 `name=`b``,你可以通过如下三种方式去解决此类问题:
+ 如上 Form.Item 并不知道需要收集 `name="a"` 还是 `name="b"`,你可以通过如下三种方式去解决此类问题:
第一种,使用多个 `a-form-item`:
@@ -301,7 +299,7 @@ Github:[https://github.com/surely-vue/table]
```
- 第二种,使用自定义组件包裹,并在自定义组件中调用 `useFormItemContext`,相当于把多个表单项合并成了一个
+ 第二种,使用自定义组件包裹,并在自定义组件中调用 `useFormItemContext`,相当于把多个表单项合并成了一个。
```html