Skip to content

Commit c0972ce

Browse files
docs: align API table defaults and versions between en-US and zh-CN (#59214)
* docs: align API table defaults and versions between en-US and zh-CN Fix empty or contradictory Default / Version cells found by diffing the English and Chinese API tables: Anchor onChange, Grid span, InputNumber onStep, Slider draggableTrack, Splitter orientation/vertical, Statistic.Countdown onChange, List itemLayout and Modal open. * docs: escape union type separator in List itemLayout row * docs: use dash for pre-v6 property versions per AGENTS.md InputNumber onStep, Slider draggableTrack and Statistic.Countdown onChange already existed in the previous major, so the version column uses '-' as AGENTS.md specifies. Splitter's 6.0.0 entries are kept. --------- Co-authored-by: 高艳兵 <[email protected]>
1 parent c840fec commit c0972ce

11 files changed

Lines changed: 13 additions & 13 deletions

File tree

‎components/anchor/index.en-US.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Common props ref:[Common props](/docs/react/common-props)
5151
| showInkInFixed | Whether show ink-square when `affix={false}` | boolean | false | | × |
5252
| styles | Customize inline style for each semantic structure inside the component. Supports object or function. | Record<[SemanticDOM](#semantic-dom), CSSProperties> \| (info: { props })=> Record<[SemanticDOM](#semantic-dom), CSSProperties> | - | | 6.0.0 |
5353
| targetOffset | Anchor scroll offset, default as `offsetTop`, [example](#anchor-demo-targetoffset) | number | - | | × |
54-
| onChange | Listening for anchor link change | (currentActiveLink: string) => void | | | × |
54+
| onChange | Listening for anchor link change | (currentActiveLink: string) => void | - | | × |
5555
| onClick | Set the handler to handle `click` event | (e: MouseEvent, link: object) => void | - | | × |
5656
| items | Data configuration option content, support nesting through children | { key, href, title, target, children }\[] [see](#anchoritem) | - | 5.1.0 | × |
5757
| direction | Set Anchor direction | `vertical` \| `horizontal` | `vertical` | 5.2.0 | × |

‎components/grid/index.en-US.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ If the Ant Design grid layout component does not meet your needs, you can use th
7676
| order | Raster order | number | 0 | | × |
7777
| pull | The number of cells that raster is moved to the left | number | 0 | | × |
7878
| push | The number of cells that raster is moved to the right | number | 0 | | × |
79-
| span | Raster number of cells to occupy, 0 corresponds to `display: none` | number | none | | × |
79+
| span | Raster number of cells to occupy, 0 corresponds to `display: none` | number | - | | × |
8080
| xs | `screen < 576px` and also default setting, could be a `span` value or an object containing above props | number \| object | - | | × |
8181
| sm | `screen ≥ 576px`, could be a `span` value or an object containing above props | number \| object | - | | × |
8282
| md | `screen ≥ 768px`, could be a `span` value or an object containing above props | number \| object | - | | × |

‎components/input-number/index.en-US.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Common props ref:[Common props](/docs/react/common-props)
7373
| variant | Variants of Input | `outlined` \| `borderless` \| `filled` \| `underlined` | `outlined` | 5.13.0 \| `underlined`: 5.24.0 | 5.19.0 |
7474
| onChange | The callback triggered when the value is changed | function(value: number \| string \| null) | - | - | × |
7575
| onPressEnter | The callback function that is triggered when Enter key is pressed | function(e) | - | - | × |
76-
| onStep | The callback function that is triggered when click up or down buttons / Keyboard / Wheel | (value: number, info: { offset: number, type: 'up' \| 'down', emitter: 'handler' \| 'keydown' \| 'wheel' }) => void | - | | × |
76+
| onStep | The callback function that is triggered when click up or down buttons / Keyboard / Wheel | (value: number, info: { offset: number, type: 'up' \| 'down', emitter: 'handler' \| 'keydown' \| 'wheel' }) => void | - | - | × |
7777
| ~~bordered~~ | Whether has border style, please use `variant` instead | boolean | true | - | × |
7878

7979
## Ref

‎components/input-number/index.zh-CN.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ demo:
7474
| variant | 形态变体 | `outlined` \| `borderless` \| `filled` \| `underlined` | `outlined` | 5.13.0 \| `underlined`: 5.24.0 | 5.19.0 |
7575
| onChange | 变化回调 | function(value: number \| string \| null) | - | - | × |
7676
| onPressEnter | 按下回车的回调 | function(e) | - | - | × |
77-
| onStep | 点击上下箭头、键盘、滚轮的回调 | (value: number, info: { offset: number, type: 'up' \| 'down', emitter: 'handler' \| 'keydown' \| 'wheel' }) => void | - | 4.7.0 | × |
77+
| onStep | 点击上下箭头、键盘、滚轮的回调 | (value: number, info: { offset: number, type: 'up' \| 'down', emitter: 'handler' \| 'keydown' \| 'wheel' }) => void | - | - | × |
7878
| ~~bordered~~ | 是否带边框,请使用 `variant` 替代 | boolean | true | - | × |
7979

8080
## Ref

‎components/list/index.zh-CN.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ List 组件已经进入废弃阶段,将于下个 major 版本移除,请改
5353
| footer | 列表底部 | ReactNode | - | | × |
5454
| grid | 列表栅格配置 | [object](#list-grid-props) | - | | × |
5555
| header | 列表头部 | ReactNode | - | | × |
56-
| itemLayout | 设置 `List.Item` 布局,设置成 `vertical` 则竖直样式显示,默认横排 | string | - | | × |
56+
| itemLayout | 设置 `List.Item` 布局,设置成 `vertical` 则竖直样式显示,默认横排 | `horizontal` \| `vertical` | `horizontal` | | × |
5757
| loading | 当卡片内容还在加载中时,可以用 `loading` 展示一个占位 | boolean \| [object](/components/spin-cn#api) ([更多](https://github.com/ant-design/ant-design/issues/8659)) | false | | × |
5858
| loadMore | 加载更多 | ReactNode | - | | × |
5959
| locale | 默认文案设置,目前包括空数据文案 | object | {emptyText: `暂无数据`} | | × |

‎components/modal/index.zh-CN.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ demo:
7676
| loading | 显示骨架屏 | boolean | | 5.18.0 | × |
7777
| scrollLock | 弹窗打开时是否锁定body滚动 | boolean | true | 6.5.0 | × |
7878
| title | 标题 | ReactNode | - | | × |
79-
| open | 对话框是否可见 | boolean | - | | × |
79+
| open | 对话框是否可见 | boolean | false | | × |
8080
| width | 宽度 | string \| number \| [Breakpoint](/components/grid-cn#col) | 520 | Breakpoint: 5.23.0 | × |
8181
| wrapClassName | 对话框外层容器的类名 | string | - | | × |
8282
| zIndex | 设置 Modal 的 `z-index` | number | 1000 | | × |

‎components/slider/index.zh-CN.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ demo:
6767

6868
| 参数 | 说明 | 类型 | 默认值 | 版本 |
6969
| -------------- | -------------------------------------------------- | ------- | ------ | ------ |
70-
| draggableTrack | 范围刻度是否可被拖拽 | boolean | false | |
70+
| draggableTrack | 范围刻度是否可被拖拽 | boolean | false | - |
7171
| editable | 启动动态增减节点,不能和 `draggableTrack` 一同使用 | boolean | false | 5.20.0 |
7272
| minCount | 配置 `editable` 时,最小节点数量 | number | 0 | 5.20.0 |
7373
| maxCount | 配置 `editable` 时,最大节点数量 | number | - | 5.20.0 |

‎components/splitter/index.en-US.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ Common props ref:[Common props](/docs/react/common-props)
5151
| ~~layout~~ | Layout direction | `horizontal` \| `vertical` | `horizontal` | - | × |
5252
| lazy | Lazy mode | `boolean` | `false` | 5.23.0 | × |
5353
| onCollapse | Callback when expanding or collapsing | `(collapsed: boolean[], sizes: number[]) => void` | - | 5.28.0 | × |
54-
| orientation | Orientation direction | `horizontal` \| `vertical` | `horizontal` | | × |
54+
| orientation | Orientation direction | `horizontal` \| `vertical` | `horizontal` | 6.0.0 | × |
5555
| styles | Customize inline style for each semantic structure inside the component. Supports object or function. | Record<[SemanticDOM](#semantic-dom), CSSProperties> \| (info: { props })=> Record<[SemanticDOM](#semantic-dom), CSSProperties> | - | 6.0.0 | 6.0.0 |
56-
| vertical | Orientation. Simultaneously existing with `orientation`, `orientation` takes priority | boolean | `false` | | × |
56+
| vertical | Orientation. Simultaneously existing with `orientation`, `orientation` takes priority | boolean | `false` | 6.0.0 | × |
5757
| onDraggerDoubleClick | Callback triggered when the dragger is double-clicked | `(index: number) => void` | - | 6.3.0 | × |
5858
| onResize | Panel size change callback | `(sizes: number[]) => void` | - | - | × |
5959
| onResizeEnd | Drag end callback | `(sizes: number[]) => void` | - | - | × |

‎components/splitter/index.zh-CN.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ demo:
5252
| ~~layout~~ | 布局方向 | `horizontal` \| `vertical` | `horizontal` | - | × |
5353
| lazy | 延迟渲染模式 | `boolean` | `false` | 5.23.0 | × |
5454
| onCollapse | 展开-收起时回调 | `(collapsed: boolean[], sizes: number[]) => void` | - | 5.28.0 | × |
55-
| orientation | 布局方向 | `horizontal` \| `vertical` | `horizontal` | - | × |
55+
| orientation | 布局方向 | `horizontal` \| `vertical` | `horizontal` | 6.0.0 | × |
5656
| styles | 用于自定义组件内部各语义化结构的行内 style,支持对象或函数 | Record<[SemanticDOM](#semantic-dom), CSSProperties> \| (info: { props })=> Record<[SemanticDOM](#semantic-dom), CSSProperties> | - | 6.0.0 | 6.0.0 |
57-
| vertical | 排列方向,与 `orientation` 同时存在,以 `orientation` 优先 | boolean | `false` | | × |
57+
| vertical | 排列方向,与 `orientation` 同时存在,以 `orientation` 优先 | boolean | `false` | 6.0.0 | × |
5858
| onDraggerDoubleClick | 双击拖拽条回调 | `(index: number) => void` | - | 6.3.0 | × |
5959
| onResize | 面板大小变化回调 | `(sizes: number[]) => void` | - | - | × |
6060
| onResizeEnd | 拖拽结束回调 | `(sizes: number[]) => void` | - | - | × |

‎components/statistic/index.en-US.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Common props ref:[Common props](/docs/react/common-props)
6060
| value | Set target countdown time | number | - | |
6161
| valueStyle | Set value section style | CSSProperties | - | |
6262
| onFinish | Trigger when time's up | () => void | - | |
63-
| onChange | Trigger when time's changing | (value: number) => void | - | 4.16.0 |
63+
| onChange | Trigger when time's changing | (value: number) => void | - | - |
6464

6565
#### Statistic.Timer <Badge>5.25.0+</Badge>
6666

0 commit comments

Comments
 (0)