2017-11-07 03:58:47 +00:00
|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<RadioGroup @change="onChange" defaultValue="a">
|
|
|
|
<RadioButton value="a">Hangzhou</RadioButton>
|
|
|
|
<RadioButton value="b">Shanghai</RadioButton>
|
|
|
|
<RadioButton value="c">Beijing</RadioButton>
|
|
|
|
<RadioButton value="d">Chengdu</RadioButton>
|
|
|
|
</RadioGroup>
|
|
|
|
</div>
|
2018-01-15 10:54:26 +00:00
|
|
|
<div :style="{ marginTop: '16px' }">
|
2017-11-07 03:58:47 +00:00
|
|
|
<RadioGroup @change="onChange" defaultValue="a">
|
|
|
|
<RadioButton value="a">Hangzhou</RadioButton>
|
|
|
|
<RadioButton value="b" disabled>Shanghai</RadioButton>
|
|
|
|
<RadioButton value="c">Beijing</RadioButton>
|
|
|
|
<RadioButton value="d">Chengdu</RadioButton>
|
|
|
|
</RadioGroup>
|
|
|
|
</div>
|
2018-01-15 10:54:26 +00:00
|
|
|
<div :style="{ marginTop: '16px' }">
|
2017-11-07 03:58:47 +00:00
|
|
|
<RadioGroup disabled @change="onChange" defaultValue="a">
|
|
|
|
<RadioButton value="a">Hangzhou</RadioButton>
|
|
|
|
<RadioButton value="b">Shanghai</RadioButton>
|
|
|
|
<RadioButton value="c">Beijing</RadioButton>
|
|
|
|
<RadioButton value="d">Chengdu</RadioButton>
|
|
|
|
</RadioGroup>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
import { Radio } from 'antd'
|
|
|
|
export default {
|
|
|
|
methods: {
|
|
|
|
onChange (e) {
|
|
|
|
console.log(`checked = ${e.target.value}`)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
components: {
|
|
|
|
RadioButton: Radio.Button,
|
|
|
|
RadioGroup: Radio.Group,
|
|
|
|
},
|
|
|
|
}
|
|
|
|
</script>
|