diff --git a/src/mixins/field.js b/src/mixins/field.js index ab1f1399a..f5fb25bfe 100644 --- a/src/mixins/field.js +++ b/src/mixins/field.js @@ -14,7 +14,7 @@ export const FieldMixin = { }, created() { - if (this.vanField) { + if (this.vanField && !this.vanField.children) { this.vanField.children = this; } }, diff --git a/src/radio-group/index.js b/src/radio-group/index.js index e29c8141f..88755a5c5 100644 --- a/src/radio-group/index.js +++ b/src/radio-group/index.js @@ -1,10 +1,11 @@ import { createNamespace } from '../utils'; +import { FieldMixin } from '../mixins/field'; import { ParentMixin } from '../mixins/relation'; const [createComponent, bem] = createNamespace('radio-group'); export default createComponent({ - mixins: [ParentMixin('vanRadio')], + mixins: [ParentMixin('vanRadio'), FieldMixin], props: { value: null,