RadioGroup: fix RadioGroup used in component causes exception #17908 (#20783)

pull/21136/head
lichao 2021-07-09 16:34:30 +08:00 committed by GitHub
parent 10bb2df826
commit 960bbcb562
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -43,7 +43,9 @@
return (this.elFormItem || {}).elFormItemSize; return (this.elFormItem || {}).elFormItemSize;
}, },
_elTag() { _elTag() {
return (this.$vnode.data || {}).tag || 'div'; let tag = (this.$vnode.data || {}).tag;
if (!tag || tag === 'component') tag = 'div';
return tag;
}, },
radioGroupSize() { radioGroupSize() {
return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size; return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;