2020-02-04 17:18:32 +08:00
|
|
|
# 基础用法
|
|
|
|
```html
|
|
|
|
<n-radio
|
|
|
|
v-model="value"
|
|
|
|
value="Definitely Maybe"
|
|
|
|
>
|
|
|
|
Definitely Maybe
|
|
|
|
</n-radio>
|
|
|
|
<n-radio
|
|
|
|
v-model="value"
|
|
|
|
value="Be Here Now"
|
|
|
|
>
|
|
|
|
Be Here Now
|
|
|
|
</n-radio>
|
|
|
|
<n-radio
|
|
|
|
v-model="value"
|
|
|
|
value="Be Here Now"
|
2020-02-20 13:22:48 +08:00
|
|
|
:disabled="disabled"
|
2020-02-04 17:18:32 +08:00
|
|
|
>
|
|
|
|
Be Here Now
|
|
|
|
</n-radio>
|
2020-02-20 13:22:48 +08:00
|
|
|
<n-switch v-model="disabled"/>
|
|
|
|
|
2020-02-04 17:18:32 +08:00
|
|
|
```
|
|
|
|
```js
|
|
|
|
export default {
|
|
|
|
data () {
|
|
|
|
return {
|
2020-02-20 13:22:48 +08:00
|
|
|
disabled: true,
|
2020-02-04 17:18:32 +08:00
|
|
|
value: null
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-03-01 15:13:12 +08:00
|
|
|
```
|
|
|
|
```css
|
|
|
|
.n-radio {
|
|
|
|
margin-right: 8px;
|
|
|
|
}
|
2020-02-04 17:18:32 +08:00
|
|
|
```
|