diff --git a/src/components/radio/radio-group.vue b/src/components/radio/radio-group.vue index f13afffe..6d9ffeed 100644 --- a/src/components/radio/radio-group.vue +++ b/src/components/radio/radio-group.vue @@ -53,7 +53,7 @@ data () { return { currentValue: this.value, - childrens: [] + children: [] }; }, computed: { @@ -75,9 +75,9 @@ }, methods: { updateValue () { - this.childrens = findComponentsDownward(this, 'Radio'); - if (this.childrens) { - this.childrens.forEach(child => { + this.children = findComponentsDownward(this, 'Radio'); + if (this.children) { + this.children.forEach(child => { child.currentValue = this.currentValue === child.label; child.group = true; }); diff --git a/src/utils/assist.js b/src/utils/assist.js index 49929cea..3097d288 100644 --- a/src/utils/assist.js +++ b/src/utils/assist.js @@ -193,11 +193,11 @@ export {findComponentUpward}; // Find component downward export function findComponentDownward (context, componentName) { - const childrens = context.$children; + const $children = context.$children; let children = null; - if (childrens.length) { - for (const child of childrens) { + if ($children.length) { + for (const child of $children) { const name = child.$options.name; if (name === componentName) { children = child;