update Radio

This commit is contained in:
梁灏 2017-04-27 18:04:51 +08:00
parent f89dd9c287
commit bb1f58e203
2 changed files with 11 additions and 5 deletions

View file

@ -1,8 +1,10 @@
<template>
<div>
<Radio-group v-model="date.sex">
<Radio label="male form"></Radio>
<Radio label="female"></Radio>
<div v-if="show">
<Radio label="male"></Radio>
<Radio label="female"></Radio>
</div>
</Radio-group>
<Button @click="handleChange">change</Button>
</div>
@ -12,13 +14,15 @@
data () {
return {
date: {
sex: ''
}
sex: 'male'
},
show: false
}
},
methods: {
handleChange () {
this.date.sex = 'male form';
// this.date.sex = 'male form';
this.show = true;
}
}
}

View file

@ -71,6 +71,8 @@
if (this.parent) this.group = true;
if (!this.group) {
this.updateValue();
} else {
this.parent.updateValue();
}
},
methods: {