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');
|
this.childrens = findComponentsDownward(this, 'Radio');
|
||||||
if (this.childrens) {
|
if (this.childrens) {
|
||||||
this.childrens.forEach(child => {
|
this.childrens.forEach(child => {
|
||||||
child.currentValue = this.value === child.label;
|
child.currentValue = this.currentValue === child.label;
|
||||||
child.group = true;
|
child.group = true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -82,9 +82,11 @@
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
value () {
|
value () {
|
||||||
|
if(this.currentValue !== this.value){
|
||||||
this.currentValue = this.value;
|
this.currentValue = this.value;
|
||||||
this.updateValue();
|
this.updateValue();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Add table
Reference in a new issue