Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: Improve doc descriptions of some components #6233

Merged
merged 2 commits into from
Jul 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/checkbox/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type CheckboxValue = string | number
| block | Whether to render as a block-level element | `boolean` | `false` |
| checked | To specify whether selected or not currently | `boolean` | `false` |
| defaultChecked | Selected or not initially | `boolean` | `false` |
| disabled | Failure state | `boolean` | `false` |
| disabled | Disabled state | `boolean` | `false` |
| icon | The customized `icon` | `(checked: boolean, indeterminate: boolean) => React.ReactNode` | - |
| id | The id of the input element, often used in conjunction with the label | `string` | - |
| indeterminate | To set the `indeterminate` state, only responsible for style control | `boolean` | `false` |
Expand Down
2 changes: 1 addition & 1 deletion src/components/checkbox/index.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type CheckboxValue = string | number
| block | 是否渲染为块级元素 | `boolean` | `false` |
| checked | 指定当前是否选中 | `boolean` | `false` |
| defaultChecked | 初始是否选中 | `boolean` | `false` |
| disabled | 失效状态 | `boolean` | `false` |
| disabled | 禁用状态 | `boolean` | `false` |
| icon | 自定义 `icon` 图标 | `(checked: boolean, indeterminate: boolean) => React.ReactNode` | - |
| id | `input` 元素的 `id`,常用来配合 `label` 使用 | `string` | - |
| indeterminate | 设置 `indeterminate` 状态,只负责样式控制 | `boolean` | `false` |
Expand Down
2 changes: 1 addition & 1 deletion src/components/picker/index.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ type PickerDate = Date & {
| 属性 | 说明 | 类型 | 默认值 | 版本 |
| --- | --- | --- | --- | --- |
| children | 所选项的渲染函数 | `(value: PickerDate, actions: PickerActions) => ReactNode` | - |
| defaultValue | 选中值 | `PickerDate` | - |
| defaultValue | 默认选中值 | `PickerDate` | - |
| destroyOnClose | 不可见时是否销毁 `DOM` 结构 | `boolean` | `false` |
| filter | 过滤可供选择的时间 | `DatePickerFilter` | - |
| forceRender | 强制渲染内容 | `boolean` | `false` |
Expand Down
2 changes: 1 addition & 1 deletion src/components/radio/index.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type RadioValue = string | number
| block | 是否渲染为块级元素 | `boolean` | `false` |
| checked | 指定当前是否选中 | `boolean` | `false` |
| defaultChecked | 初始是否选中 | `boolean` | `false` |
| disabled | 失效状态 | `boolean` | `false` |
| disabled | 禁用状态 | `boolean` | `false` |
| icon | 自定义 `icon` 图标 | `(checked: boolean) => React.ReactNode` | - |
| id | `input` 元素的 `id`,常用来配合 `label` 使用 | `string` | - |
| onChange | 变化时回调函数 | `(val: boolean) => void` | - |
Expand Down
2 changes: 1 addition & 1 deletion src/components/selector/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Provides multiple options for the user to choose from, typically used in filters
| --- | --- | --- | --- |
| columns | Number of the displayed columns (Note that `grid` layout not support in IOS 9) | `number` | - |
| defaultValue | Selected value by default | `SelectorValue[]` | `[]` |
| disabled | Whether to disable selecting | `boolean` | `false` |
| disabled | Whether to all disable selecting | `boolean` | `false` |
| multiple | Whether to allow multiple selections | `boolean` | `false` |
| onChange | Triggered when the value is changed | `(value: SelectorValue[], extend: { items: SelectorOption[] }) => void` | - |
| options | Optional selector | `SelectorOption[]` | - |
Expand Down
2 changes: 1 addition & 1 deletion src/components/selector/index.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
| --- | --- | --- | --- |
| columns | 列数(注意 `grid` 布局在 IOS 9 下不支持) | `number` | - |
| defaultValue | 默认项 | `SelectorValue[]` | `[]` |
| disabled | 是否全局禁止选中 | `boolean` | `false` |
| disabled | 是否全部禁止选中 | `boolean` | `false` |
| multiple | 是否允许多选 | `boolean` | `false` |
| onChange | 选项改变时触发 | `(value: SelectorValue[], extend: { items: SelectorOption[] }) => void` | - |
| options | 可选项 | `SelectorOption[]` | - |
Expand Down
2 changes: 1 addition & 1 deletion src/components/stepper/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ It is suitable for inputting and adjusting the current value within a certain ra
| onChange | Callback when value is changed | `(value: number \| null) => void` | - |
| onFocus | Triggered when the input get focus | `(e: React.FocusEvent<HTMLInputElement>) => void` | - |
| parser | Parse input text into number which should work with `formatter` | `(text: string) => number` | - | 5.26.0 |
| step | Change the number of steps each time, it can be a decimal | `number` | `1` |
| step | The value to increase or decrease each time, can be a decimal | `number` | `1` |
| stringMode | Set value as string to support high precision decimals. Will set `defaultValue`,`value`, `min`, `max`, `onChange` to `string` type | `boolean` | `false` | 5.27.0 |
| value | Current number, controlled value | `number \| null` | - |

Expand Down
2 changes: 1 addition & 1 deletion src/components/stepper/index.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
| onChange | 变化时的回调 | `(value: number \| null) => void` | - |
| onFocus | 输入框获得焦点时触发 | `(e: React.FocusEvent<HTMLInputElement>) => void` | - |
| parser | 将输入解析为对应数字,一般配合 `formatter` 使用 | `(text: string) => number` | - | 5.26.0 |
| step | 每次改变步数,可以为小数 | `number` | `1` |
| step | 每次增加或减少的值,可以为小数 | `number` | `1` |
| stringMode | 字符值模式,开启后支持高精度小数。开启后 `defaultValue`、`value`、`min`、`max`、`onChange` 等都将转换为 `string` 类型 | `boolean` | `false` | 5.27.0 |
| value | 当前数,受控值 | `number \| null` | - |

Expand Down
2 changes: 1 addition & 1 deletion src/components/switch/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ switch selector.

| Name | Description | Type | Default |
| --- | --- | --- | --- |
| beforeChange(deprecated) | Execute before change (Deprecated, recommend using the onChange attribute.) | `(val: boolean) => Promise<void>` | - |
| beforeChange(deprecated) | Execute before change (Deprecated, recommend using the `onChange` attribute.) | `(val: boolean) => Promise<void>` | - |
| checked | Specify whether it is currently opened | `boolean` | `false` |
| checkedText | Selected text | `ReactNode` | - |
| defaultChecked | Whether to open initially | `boolean` | `false` |
Expand Down
Loading