You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ant-design-vue/components/radio/demo/radioGroup.vue

28 lines
492 B

<template>
<RadioGroup @change="onChange" v-model="value">
<Radio :value="1">A</Radio>
<Radio :value="2">B</Radio>
<Radio :value="3">C</Radio>
<Radio :value="4">D</Radio>
</RadioGroup>
</template>
<script>
import { Radio } from 'antd'
export default {
data () {
return {
value: 1,
}
},
methods: {
onChange (e) {
console.log('radio checked', e.target.value)
},
},
components: {
Radio,
RadioGroup: Radio.Group,
},
}
</script>