iview/examples/routers/radio.vue

26 lines
549 B
Vue
Raw Normal View History

2016-09-09 14:29:19 +08:00
<template>
<div>
2017-03-28 09:04:57 +08:00
<Radio-group v-model="date.sex">
<Radio label="male form"></Radio>
<Radio label="female"></Radio>
</Radio-group>
2017-03-28 09:04:57 +08:00
<Button @click="handleChange">change</Button>
2016-09-09 14:29:19 +08:00
</div>
</template>
<script>
export default {
data () {
return {
2017-03-28 09:04:57 +08:00
date: {
sex: ''
}
}
},
methods: {
handleChange () {
this.date.sex = 'male form';
2016-09-09 14:29:19 +08:00
}
}
}
2016-11-09 18:23:17 +08:00
</script>