Skip to content

Commit fc822fe

Browse files
nullptruziyoung
authored andcommitted
RadioGroup: not produce invalid HTML in table if "is" attribute is specify (ElemeFE#17070)
1 parent 77c77ef commit fc822fe

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/radio/src/radio-group.vue

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
<template>
2-
<div
2+
<component
3+
:is="_elTag"
34
class="el-radio-group"
45
role="radiogroup"
56
@keydown="handleKeydown"
67
>
78
<slot></slot>
8-
</div>
9+
</component>
910
</template>
1011
<script>
1112
import Emitter from 'element-ui/src/mixins/emitter';
@@ -41,6 +42,9 @@
4142
_elFormItemSize() {
4243
return (this.elFormItem || {}).elFormItemSize;
4344
},
45+
_elTag() {
46+
return (this.$vnode.data || {}).tag || 'div';
47+
},
4448
radioGroupSize() {
4549
return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
4650
}

0 commit comments

Comments
 (0)