Merge pull request #3498 from Superman379/patch-2
修复RadioGroup只能在使用v-model绑定的情况下才能正常使用的bug。
This commit is contained in:
commit
37322f8211
1 changed files with 5 additions and 3 deletions
|
@ -67,7 +67,7 @@
|
|||
this.childrens = findComponentsDownward(this, 'Radio');
|
||||
if (this.childrens) {
|
||||
this.childrens.forEach(child => {
|
||||
child.currentValue = this.value === child.label;
|
||||
child.currentValue = this.currentValue === child.label;
|
||||
child.group = true;
|
||||
});
|
||||
}
|
||||
|
@ -82,8 +82,10 @@
|
|||
},
|
||||
watch: {
|
||||
value () {
|
||||
this.currentValue = this.value;
|
||||
this.updateValue();
|
||||
if(this.currentValue !== this.value){
|
||||
this.currentValue = this.value;
|
||||
this.updateValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue