ant-design-vue/components/radio/demo/radioGroup.vue

28 lines
492 B
Vue
Raw Normal View History

2017-11-07 11:58:47 +08:00
<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>