单选在main.js里 //table单选报错问题 Vue.directive('removeAriaHidden', { bind(el, binding) { const ariaEls = el.querySelectorAll('.el-radio__original') ariaEls.forEach((item) => { item.removeAttribute('aria-hidden') }) } })
多选在main.js里 //table单选报错问题 Vue.directive('removeAriaHidden', { bind(el, binding) { const ariaEls = el.querySelectorAll('.el-checkbox__original') ariaEls.forEach((item) => { item.removeAttribute('aria-hidden') }) } })
使用 <el-radio v-model="enterpriseIds" :label="scope.row.sort" @input="onRowSelected(scope.row)" v-removeAriaHidden /> 或者 <el-radio-group v-model="ruleForm.isLimit" v-removeAriaHidden> <el-radio :value="2" :label="false" size="large">否</el-radio> <el-radio :value="1" :label="true" size="large">是</el-radio> </el-radio-group>
标签:el,ariaEls,aria,element,报错,table,单选 From: https://www.cnblogs.com/prince11/p/18410170