iview/examples/routers/radio.vue

30 lines
670 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">
2017-04-27 18:04:51 +08:00
<div v-if="show">
<Radio label="male"></Radio>
<Radio label="female"></Radio>
</div>
</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: {
2017-04-27 18:04:51 +08:00
sex: 'male'
},
show: false
2017-03-28 09:04:57 +08:00
}
},
methods: {
handleChange () {
2017-04-27 18:04:51 +08:00
// this.date.sex = 'male form';
this.show = true;
2016-09-09 14:29:19 +08:00
}
}
}
2016-11-09 18:23:17 +08:00
</script>