RadioGroup: not produce invalid HTML in table if "is" attribute is specify (#17070)

pull/17120/head
Geass 2019-08-20 16:12:58 +08:00 committed by hetech
parent 77c77efb33
commit fc822fe810
1 changed files with 6 additions and 2 deletions

View File

@ -1,11 +1,12 @@
<template>
<div
<component
:is="_elTag"
class="el-radio-group"
role="radiogroup"
@keydown="handleKeydown"
>
<slot></slot>
</div>
</component>
</template>
<script>
import Emitter from 'element-ui/src/mixins/emitter';
@ -41,6 +42,9 @@
_elFormItemSize() {
return (this.elFormItem || {}).elFormItemSize;
},
_elTag() {
return (this.$vnode.data || {}).tag || 'div';
},
radioGroupSize() {
return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
}