naive-ui/demo/documentation/components/radio/enUS/index.md

58 lines
1.5 KiB
Markdown
Raw Normal View History

2019-10-21 14:49:08 +08:00
# Radio
<!--single-column-->
2020-01-28 23:15:39 +08:00
When I was young, I was fond of listening to the radio, such as FM 106.8 or FM 92.1.
## Demos
2019-10-21 14:49:08 +08:00
```demo
basic
group
button-group
2020-03-03 12:40:05 +08:00
size
2020-01-28 23:15:39 +08:00
```
## V-model
2020-02-04 17:18:32 +08:00
### Radio V-model
2020-01-28 23:15:39 +08:00
|Prop|Event|
|-|-|
|checked-value|change|
2020-02-04 17:18:32 +08:00
### Radio Group V-model
2020-01-28 23:15:39 +08:00
|Prop|Event|
|-|-|
|value|change|
## Props
2020-02-04 17:18:32 +08:00
### Radio Props
2020-01-28 23:15:39 +08:00
|Name|Type|Default|Description|
|-|-|-|-|
2020-02-14 15:27:45 +08:00
|name|`string`|`undefined`|The name attribute of the radio element. If not set, name of `radio-group` will be used.|
2020-01-28 23:15:39 +08:00
|checked-value|`string \| number \| boolean`|`null`||
|value|`string \| number \| boolean`|`null`||
|disabled|`boolean`|`false`||
2020-02-04 17:18:32 +08:00
### Radio Button Props
2020-01-28 23:15:39 +08:00
|Name|Type|Default|Description|
|-|-|-|-|
2020-02-14 15:27:45 +08:00
|name|`string`|`undefined`|The name attribute of the radio element. If not set, name of `radio-group` will be used.|
2020-01-28 23:15:39 +08:00
|checked-value|`string \| number \| boolean`|`null`||
|value|`string \| number \| boolean`|`null`||
|disabled|`boolean`|`false`||
2020-02-04 17:18:32 +08:00
### Radio Group Props
2020-01-28 23:15:39 +08:00
|Name|Type|Default|Description|
|-|-|-|-|
2020-02-14 15:27:45 +08:00
|name|`string`|`null`|The name attribute of the radio elements inside the group.|
2020-01-28 23:15:39 +08:00
|size|`'small' \| 'medium' \| 'large'`|`small`||
|value|`string \| number \| boolean`|`null`||
|disabled|`boolean`|`false`||
2020-03-03 12:40:05 +08:00
|size|`'small' \| 'medium' \| 'large'`|`'small'`||
2020-01-28 23:15:39 +08:00
## Events
2020-02-04 17:18:32 +08:00
### Radio, Radio Button Events
2020-01-28 23:15:39 +08:00
|Name|Parameters|Description|
|-|-|-|
|change|`(checkedValue: string \| number \| boolean)`||
2020-01-28 23:15:39 +08:00
2020-02-04 17:18:32 +08:00
### Radio Group Events
2020-01-28 23:15:39 +08:00
|Name|Parameters|Description|
|-|-|-|
|change|`(checkedValue: string \| number \| boolean)`||