update Radio
This commit is contained in:
parent
f89dd9c287
commit
bb1f58e203
2 changed files with 11 additions and 5 deletions
|
@ -1,8 +1,10 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<Radio-group v-model="date.sex">
|
<Radio-group v-model="date.sex">
|
||||||
<Radio label="male form"></Radio>
|
<div v-if="show">
|
||||||
<Radio label="female"></Radio>
|
<Radio label="male"></Radio>
|
||||||
|
<Radio label="female"></Radio>
|
||||||
|
</div>
|
||||||
</Radio-group>
|
</Radio-group>
|
||||||
<Button @click="handleChange">change</Button>
|
<Button @click="handleChange">change</Button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -12,13 +14,15 @@
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
date: {
|
date: {
|
||||||
sex: ''
|
sex: 'male'
|
||||||
}
|
},
|
||||||
|
show: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleChange () {
|
handleChange () {
|
||||||
this.date.sex = 'male form';
|
// this.date.sex = 'male form';
|
||||||
|
this.show = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,6 +71,8 @@
|
||||||
if (this.parent) this.group = true;
|
if (this.parent) this.group = true;
|
||||||
if (!this.group) {
|
if (!this.group) {
|
||||||
this.updateValue();
|
this.updateValue();
|
||||||
|
} else {
|
||||||
|
this.parent.updateValue();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
Loading…
Add table
Reference in a new issue