mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-24 12:45:18 +08:00
docs(switch): add switch docs (#489)
This commit is contained in:
parent
4e35169533
commit
db4cf8b511
@ -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. |
|
||||
|
@ -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` | 组件值发生变化的回调 |
|
||||
|
Loading…
Reference in New Issue
Block a user