docs(switch): add switch docs (#489)

This commit is contained in:
XieZongChen 2021-07-13 23:13:24 +08:00 committed by GitHub
parent 4e35169533
commit db4cf8b511
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 12 deletions

View File

@ -14,8 +14,8 @@ event
| Name | Type | Default | Description |
| --- | --- | --- | --- |
| default-value | `boolean` | `false` | |
| disabled | `boolean` | `false` | |
| size | `'small' \| 'medium' \| 'large'` | `'medium'` | |
| value | `boolean` | `undefined` | |
| on-update:value | `(value: boolean) => void` | `undefined` | |
| default-value | `boolean` | `false` | Default value in uncontrolled mode. |
| disabled | `boolean` | `false` | Whether to disable the switch. |
| size | `'small' \| 'medium' \| 'large'` | `'medium'` | The size of switch. |
| value | `boolean` | `undefined` | Value in controlled mode. |
| on-update:value | `(value: boolean) => void` | `undefined` | Callback when the component's value changes. |

View File

@ -12,10 +12,10 @@ event
## Props
| 名称 | 类型 | 默认值 | 说明 |
| --------------- | -------------------------------- | ----------- | ---- |
| default-value | `boolean` | `false` | |
| disabled | `boolean` | `false` | |
| size | `'small' \| 'medium' \| 'large'` | `'medium'` | |
| value | `boolean` | `undefined` | |
| on-update:value | `(value: boolean) => void` | `undefined` | |
| 名称 | 类型 | 默认值 | 说明 |
| --- | --- | --- | --- |
| default-value | `boolean` | `false` | 非受控模式下的默认值 |
| disabled | `boolean` | `false` | 是否禁用 |
| size | `'small' \| 'medium' \| 'large'` | `'medium'` | 开关大小 |
| value | `boolean` | `undefined` | 受控模式下的值 |
| on-update:value | `(value: boolean) => void` | `undefined` | 组件值发生变化的回调 |