diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index fd436fb848..b328dc2199 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -1506,7 +1506,7 @@ Ant Design 4.0-rc released! Here is the release [document](https://github.com/an - 🌟 antd package size optimization, js gzipped dropped from 532.75KB to 289.89 KB. [#20356](https://github.com/ant-design/ant-design/pull/20356) - 💄 New dark theme support. [#20281](https://github.com/ant-design/ant-design/pull/20281) -- 🌟 ConfigProvider supports `direction` internationalization setting`rtl`. [#19380](https://github.com/ant-design/ant-design/pull/19380) +- 🌟 ConfigProvider supports `direction` internationalization setting `rtl`. [#19380](https://github.com/ant-design/ant-design/pull/19380) - 🌟 New Form component. [#17327](https://github.com/ant-design/ant-design/pull/17327) - 🌟 Form comes with data binding function. - 🌟 Field changes only affect the rendering of related field components and not the entire Form. @@ -1533,7 +1533,7 @@ Ant Design 4.0-rc released! Here is the release [document](https://github.com/an - 💄 Optimized `expand` animation effect. - 🌟 New DatePicker, TimePicker and Calendar components. [#20023](https://github.com/ant-design/ant-design/pull/20023) - 🌟 Support custom date library. - - 🌟 Added `picker` support for setting selectors (no longer need to simulate selectors via controlled`mode`). + - 🌟 Added `picker` support for setting selectors (no longer need to simulate selectors via controlled `mode`). - 🌟 Full range selector support: time, date, week, month, year. - 🌟 Range selector can now select start and end times individually. - 🌟 The range selector can be set to `disabled` separately for the start and end time. @@ -1551,7 +1551,7 @@ Ant Design 4.0-rc released! Here is the release [document](https://github.com/an - 🌟 Uncontrolled mode when `value` is `undefined` now. - 🌟 TreeSelect uses virtual scrolling and optimizes keyboard support. [#19040](https://github.com/ant-design/ant-design/pull/19040) - 🌟 Uncontrolled mode when `value` is `undefined` now. -- 🌟 Button adds `default` and`link` styles for `danger`. [#19837](https://github.com/ant-design/ant-design/pull/19837) +- 🌟 Button adds `default` and `link` styles for `danger`. [#19837](https://github.com/ant-design/ant-design/pull/19837) - 🌟 Form and ConfigProvider support `size` setting to include component size. [#20570](https://github.com/ant-design/ant-design/pull/20570) - 🌟 Typography adds `suffix` attribute. [#20224](https://github.com/ant-design/ant-design/pull/20224) - 🌟 Progress adds `steps` subcomponent. [#19613](https://github.com/ant-design/ant-design/pull/19613) @@ -1560,7 +1560,7 @@ Ant Design 4.0-rc released! Here is the release [document](https://github.com/an - 🌟 Upload supports iconRender to customize icons. [#20034](https://github.com/ant-design/ant-design/pull/20034) [@qq645381995](https://github.com/qq645381995) - 🌟 Tag component preset status color. [#19399](https://github.com/ant-design/ant-design/pull/19399) - 🌟 Grid uses `flex` layout. [#16635](https://github.com/ant-design/ant-design/pull/16635) -- 🐞 Fix the display error of Carousel component `dotposition` as`left | right`. [#20645](https://github.com/ant-design/ant-design/pull/20645) [@xrkffgg](https://github.com/xrkffgg) +- 🐞 Fix the display error of Carousel component `dotposition` as `left | right`. [#20645](https://github.com/ant-design/ant-design/pull/20645) [@xrkffgg](https://github.com/xrkffgg) - 🐞 Fix Alert style text overflow. [#20318](https://github.com/ant-design/ant-design/pull/20318) - 🙅 Removed warning messages for deprecated APIs. [#17510](https://github.com/ant-design/ant-design/pull/17510) - 🙅 Added warning for Avatar, Button, Modal.method and Result components using v3 strings as icons. [#20226](https://github.com/ant-design/ant-design/pull/20226) diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index a18a8c7fde..874e6049d2 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -35,7 +35,7 @@ timeline: true - 🆕 `modal.update()` 支持函数式更新。[#27163](https://github.com/ant-design/ant-design/pull/27163) [@Mongkii](https://github.com/Mongkii) - 🆕 Modal method 增加 `bodyStyle` 属性。[#27292](https://github.com/ant-design/ant-design/pull/27292) - 🐞 Fix Modal missing `modalRender` prop。[#27272](https://github.com/ant-design/ant-design/pull/27272) [@jieny](https://github.com/jieny) - - 🐞 `Modal.config` 中设置的 `rootPrefixCls` 可以对`title`和`content`下使用的 antd 组件生效。[#27376](https://github.com/ant-design/ant-design/pull/27376) [@Chersquwn](https://github.com/Chersquwn) + - 🐞 `Modal.config` 中设置的 `rootPrefixCls` 可以对 `title` 和 `content` 下使用的 antd 组件生效。[#27376](https://github.com/ant-design/ant-design/pull/27376) [@Chersquwn](https://github.com/Chersquwn) - Input - 🆕 Input.Textarea 支持 `size` 属性。[#27110](https://github.com/ant-design/ant-design/pull/27110) - 🐞 修复 Input `allowClear` 时 `className` 丢失的问题。[#27462](https://github.com/ant-design/ant-design/pull/27462) @@ -297,7 +297,7 @@ timeline: true - Badge - 💄 新增 `@badge-color` less 变量。[#26159](https://github.com/ant-design/ant-design/pull/26159) - 🆕 Badge 新增 `size` 属性用于设置大小。[#25851](https://github.com/ant-design/ant-design/pull/25851) [@moonrailgun](https://github.com/moonrailgun) -- 🆕 Tabs 可自定义`tabBarExtraContent` 的渲染位置。[#25138](https://github.com/ant-design/ant-design/pull/25138) [@jesse3mh9a](https://github.com/jesse3mh9a) +- 🆕 Tabs 可自定义 `tabBarExtraContent` 的渲染位置。[#25138](https://github.com/ant-design/ant-design/pull/25138) [@jesse3mh9a](https://github.com/jesse3mh9a) - 💄 优化 Descriptions 在内容比较多时的显示效果。[#25903](https://github.com/ant-design/ant-design/pull/25903) - 🆕 message 支持通过 `message.desctroy(key)` 销毁。[#26052](https://github.com/ant-design/ant-design/pull/26052) [@lihqi](https://github.com/lihqi) - 💄 调整 InputNumber 操作栏在 `readOnly` 时为隐藏。[#25998](https://github.com/ant-design/ant-design/pull/25998) diff --git a/components/button/demo/block.md b/components/button/demo/block.md index 1be00d3761..73d405021c 100644 --- a/components/button/demo/block.md +++ b/components/button/demo/block.md @@ -7,7 +7,7 @@ title: ## zh-CN -`block`属性将使按钮适合其父宽度。 +`block` 属性将使按钮适合其父宽度。 ## en-US diff --git a/components/grid/demo/sort.md b/components/grid/demo/sort.md index 2a3cbcf63a..bde8a1ac59 100644 --- a/components/grid/demo/sort.md +++ b/components/grid/demo/sort.md @@ -13,7 +13,7 @@ title: ## en-US -By using `push` and`pull` class you can easily change column order. +By using `push` and `pull` class you can easily change column order. ```jsx import { Row, Col } from 'antd'; diff --git a/components/menu/index.en-US.md b/components/menu/index.en-US.md index 38fd8af004..039deed012 100644 --- a/components/menu/index.en-US.md +++ b/components/menu/index.en-US.md @@ -62,7 +62,7 @@ More layouts with navigation: [Layout](/components/layout). | key | Unique ID of the menu item | string | - | | | title | Set display title for collapsed item | string | - | | -> Note: `icon` is a newly added prop in`4.2.0`. For previous versions, please use the following method to define the icon. +> Note: `icon` is a newly added prop in `4.2.0`. For previous versions, please use the following method to define the icon. > > ```jsx > diff --git a/components/message/index.zh-CN.md b/components/message/index.zh-CN.md index b1ffe1cf45..c59d612ea9 100644 --- a/components/message/index.zh-CN.md +++ b/components/message/index.zh-CN.md @@ -36,7 +36,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/hAkKTIW0K/Message.svg - `message[level](content, [duration]).then(afterClose)` - `message[level](content, [duration], onClose).then(afterClose)` -其中`message[level]` 是组件已经提供的静态方法。`then` 接口返回值是 Promise。 +其中 `message[level]` 是组件已经提供的静态方法。`then` 接口返回值是 Promise。 也可以对象的形式传递参数: diff --git a/components/notification/demo/duration.md b/components/notification/demo/duration.md index 7db4240424..5e9d4cc8cf 100644 --- a/components/notification/demo/duration.md +++ b/components/notification/demo/duration.md @@ -7,7 +7,7 @@ title: ## zh-CN -自定义通知框自动关闭的延时,默认`4.5s`,取消自动关闭只要将该值设为 `0` 即可。 +自定义通知框自动关闭的延时,默认 `4.5s`,取消自动关闭只要将该值设为 `0` 即可。 ## en-US diff --git a/components/switch/index.zh-CN.md b/components/switch/index.zh-CN.md index 9bc1971abd..00ee4b4301 100644 --- a/components/switch/index.zh-CN.md +++ b/components/switch/index.zh-CN.md @@ -11,7 +11,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/zNdJQMhfm/Switch.svg ## 何时使用 - 需要表示开关状态/两种状态之间的切换时; -- 和 `checkbox`的区别是,切换 `switch` 会直接触发状态改变,而 `checkbox` 一般用于状态标记,需要和提交操作配合。 +- 和 `checkbox` 的区别是,切换 `switch` 会直接触发状态改变,而 `checkbox` 一般用于状态标记,需要和提交操作配合。 ## API diff --git a/components/table/index.zh-CN.md b/components/table/index.zh-CN.md index bbd70815a5..76047f319b 100644 --- a/components/table/index.zh-CN.md +++ b/components/table/index.zh-CN.md @@ -141,8 +141,8 @@ const columns = [ | render | 生成复杂数据的渲染函数,参数分别为当前行的值,当前行数据,行索引,@return 里面可以设置表格[行/列合并](#components-table-demo-colspan-rowspan) | function(text, record, index) {} | - | | | responsive | 响应式 breakpoint 配置列表。未设置则始终可见。 | [Breakpoint](https://github.com/ant-design/ant-design/blob/015109b42b85c63146371b4e32b883cf97b088e8/components/_util/responsiveObserve.ts#L1)\[] | - | 4.2.0 | | shouldCellUpdate | 自定义单元格渲染时机 | (record, prevRecord) => boolean | - | 4.3.0 | -| showSorterTooltip | 表头显示下一次排序的 tooltip 提示, 覆盖 table 中`showSorterTooltip` | boolean | true | | -| sortDirections | 支持的排序方式,覆盖`Table`中`sortDirections`, 取值为 `ascend` `descend` | Array | \[`ascend`, `descend`] | | +| showSorterTooltip | 表头显示下一次排序的 tooltip 提示, 覆盖 table 中 `showSorterTooltip` | boolean | true | | +| sortDirections | 支持的排序方式,覆盖 `Table` 中 `sortDirections`, 取值为 `ascend` `descend` | Array | \[`ascend`, `descend`] | | | sorter | 排序函数,本地排序使用一个函数(参考 [Array.sort](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort) 的 compareFunction),需要服务端排序可设为 true | function \| boolean | - | | | sortOrder | 排序的受控属性,外界可用此控制列的排序,可设置为 `ascend` `descend` false | boolean \| string | - | | | title | 列头显示文字(函数用法 `3.10.0` 后支持) | ReactNode \| ({ sortOrder, sortColumn, filters }) => ReactNode | - | | diff --git a/components/tooltip/index.zh-CN.md b/components/tooltip/index.zh-CN.md index 83ca747c46..39c56e06f9 100644 --- a/components/tooltip/index.zh-CN.md +++ b/components/tooltip/index.zh-CN.md @@ -12,7 +12,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/Vyyeu8jq2/Tooltp.svg 鼠标移入则显示提示,移出消失,气泡浮层不承载复杂文本和操作。 -可用来代替系统默认的 `title` 提示,提供一个`按钮/文字/操作`的文案解释。 +可用来代替系统默认的 `title` 提示,提供一个 `按钮/文字/操作` 的文案解释。 ## API diff --git a/components/transfer/index.zh-CN.md b/components/transfer/index.zh-CN.md index f7a87c1e4b..e2f880d717 100644 --- a/components/transfer/index.zh-CN.md +++ b/components/transfer/index.zh-CN.md @@ -66,7 +66,7 @@ Transfer 支持接收 `children` 自定义渲染列表,并返回以下参数 ## 注意 -按照 React 的[规范](http://facebook.github.io/react/docs/lists-and-keys.html#keys),所有的组件数组必须绑定 key。在 Transfer 中,`dataSource`里的数据值需要指定 `key` 值。对于 `dataSource` 默认将每列数据的 `key` 属性作为唯一的标识。 +按照 React 的[规范](http://facebook.github.io/react/docs/lists-and-keys.html#keys),所有的组件数组必须绑定 key。在 Transfer 中,`dataSource` 里的数据值需要指定 `key` 值。对于 `dataSource` 默认将每列数据的 `key` 属性作为唯一的标识。 如果你的数据没有这个属性,务必使用 `rowKey` 来指定数据列的主键。 diff --git a/components/tree/index.zh-CN.md b/components/tree/index.zh-CN.md index 465192fbe4..fb8d9edfb4 100644 --- a/components/tree/index.zh-CN.md +++ b/components/tree/index.zh-CN.md @@ -21,7 +21,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/Xh-oWqg9k/Tree.svg | autoExpandParent | 是否自动展开父节点 | boolean | false | | | blockNode | 是否节点占据一行 | boolean | false | | | checkable | 节点前添加 Checkbox 复选框 | boolean | false | | -| checkedKeys | (受控)选中复选框的树节点(注意:父子节点有关联,如果传入父节点 key,则子节点自动选中;相应当子节点 key 都传入,父节点也自动选中。当设置`checkable`和`checkStrictly`,它是一个有`checked`和`halfChecked`属性的对象,并且父子节点的选中与否不再关联 | string\[] \| {checked: string\[], halfChecked: string\[]} | \[] | | +| checkedKeys | (受控)选中复选框的树节点(注意:父子节点有关联,如果传入父节点 key,则子节点自动选中;相应当子节点 key 都传入,父节点也自动选中。当设置 `checkable` 和 `checkStrictly`,它是一个有`checked`和`halfChecked`属性的对象,并且父子节点的选中与否不再关联 | string\[] \| {checked: string\[], halfChecked: string\[]} | \[] | | | checkStrictly | checkable 状态下节点选择完全受控(父子节点选中状态不再关联) | boolean | false | | | defaultCheckedKeys | 默认选中复选框的树节点 | string\[] | \[] | | | defaultExpandAll | 默认展开所有树节点 | boolean | false | | @@ -78,7 +78,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/Xh-oWqg9k/Tree.svg ## 注意 -在 `3.4.0` 之前:树节点可以有很多,但在设置`checkable`时,将会花费更多的计算时间,因此我们缓存了一些计算结果(`this.treeNodesStates`)来复用,避免多次重复计算,以此提高性能。但这也带来了一些限制,当你异步加载树节点时,你需要这样渲染树: +在 `3.4.0` 之前:树节点可以有很多,但在设置 `checkable` 时,将会花费更多的计算时间,因此我们缓存了一些计算结果(`this.treeNodesStates`)来复用,避免多次重复计算,以此提高性能。但这也带来了一些限制,当你异步加载树节点时,你需要这样渲染树: ```jsx { diff --git a/docs/react/migration-v4.zh-CN.md b/docs/react/migration-v4.zh-CN.md index 6e314e7aed..163a7b3843 100644 --- a/docs/react/migration-v4.zh-CN.md +++ b/docs/react/migration-v4.zh-CN.md @@ -17,7 +17,7 @@ title: 从 v3 到 v4 ### 设计规范调整 - 行高从 `1.5`(`21px`) 调整为 `1.5715`(`22px`)。 -- 基础圆角调整,由`4px` 改为 `2px`。 +- 基础圆角调整,由 `4px` 改为 `2px`。 - Selected 颜色和 Hovered 颜色进行了交换。 - 全局阴影优化,调整为三层阴影区分控件层次关系。 - 气泡确认框中图标的使用改变,由问号改为感叹号。 diff --git a/docs/react/practical-projects.zh-CN.md b/docs/react/practical-projects.zh-CN.md index 48d96fa781..7157acc0d6 100644 --- a/docs/react/practical-projects.zh-CN.md +++ b/docs/react/practical-projects.zh-CN.md @@ -102,7 +102,7 @@ export default ProductList; ## 简单数据流方案 -`@umijs/plugin-model` 是一种基于 hooks 范式的简单数据流方案,可以在一定情况下替代 dva 来进行中台的全局数据流。我们约定在 `src/models`目录下的文件为项目定义的 model 文件。每个文件需要默认导出一个 function,该 function 定义了一个 Hook,不符合规范的文件我们会过滤掉。 +`@umijs/plugin-model` 是一种基于 hooks 范式的简单数据流方案,可以在一定情况下替代 dva 来进行中台的全局数据流。我们约定在 `src/models` 目录下的文件为项目定义的 model 文件。每个文件需要默认导出一个 function,该 function 定义了一个 Hook,不符合规范的文件我们会过滤掉。 文件名则对应最终 model 的 name,你可以通过插件提供的 API 来消费 model 中的数据。 diff --git a/docs/spec/reaction.zh-CN.md b/docs/spec/reaction.zh-CN.md index 317858d2f8..f2f14661a7 100644 --- a/docs/spec/reaction.zh-CN.md +++ b/docs/spec/reaction.zh-CN.md @@ -5,7 +5,7 @@ order: 10 title: 即时反应 --- -「提供邀请」的强大体现在`交互之前`给出反馈,解决易发现性问题;「巧用过渡」的有用体现在它能够在`交互期间`为用户提供视觉反馈;「即时反应」的重要性体现在`交互之后`立即给出反馈。 +「提供邀请」的强大体现在 `交互之前` 给出反馈,解决易发现性问题;「巧用过渡」的有用体现在它能够在 `交互期间` 为用户提供视觉反馈;「即时反应」的重要性体现在 `交互之后` 立即给出反馈。 就像「牛顿第三定律」所描述作用力和反作用一样,用户进行了操作或者内部数据发生了变化,系统就应该立即有一个对应的反馈,同时输入量级越大、重要性越高,那么反馈量级越大、重要性越高。