mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-27 05:00:48 +08:00
815 B
815 B
基础用法
<n-space>
<n-radio
:checked="checkedValue === 'Definitely Maybe'"
@change="handleChange"
value="Definitely Maybe"
name="basic-demo"
>
Definitely Maybe
</n-radio>
<n-radio
:checked="checkedValue === 'Be Here Now'"
@change="handleChange"
value="Be Here Now"
name="basic-demo"
>
Be Here Now
</n-radio>
<n-radio
:checked="checkedValue === 'Be Here Now'"
@change="handleChange"
value="Be Here Now"
:disabled="disabled"
name="basic-demo"
>
Be Here Now
</n-radio>
<n-switch v-model:value="disabled"/>
</n-space>
export default {
data () {
return {
disabled: true,
checkedValue: null
}
},
methods: {
handleChange (e) {
this.checkedValue = e.target.value
}
}
}