feat: migrate Radio/RadioGroup

This commit is contained in:
chenjiahan
2020-08-15 07:20:25 +08:00
parent ab067ecb0c
commit 2172cce8b6
5 changed files with 20 additions and 12 deletions
+4 -2
View File
@@ -12,14 +12,16 @@ export default createComponent({
}),
],
emits: ['click', 'update:modelValue'],
computed: {
currentValue: {
get() {
return this.parent ? this.parent.value : this.value;
return this.parent ? this.parent.modelValue : this.modelValue;
},
set(val) {
(this.parent || this).$emit('input', val);
(this.parent || this).$emit('update:modelValue', val);
},
},