bug
查资料找到三种解决方案
1.第一种在main.js中加入,然后在报错的组件上加,但我没有解决
Vue.directive('removeAriaHidden', {
bind(el, binding) {
let ariaEls = el.querySelectorAll('.el-radio__original');
ariaEls.forEach((item) => {
item.removeAttribute('aria-hidden');
});
}
});
<el-radio-group v-removeAriaHidden>
<el-radio :label="1">A模式</el-radio>
<el-radio :label="2">B模式</el-radio>
</el-radio-group>
2.方案二,加一个mounted方法去除这个错误,我还是没有解决
<el-radio-group
v-model="formData.dimension"
@input="changeHandle"
ref="radio"
>
<el-radio :label="1">男</el-radio>
<el-radio :label="2">女</el-radio>
</el-radio-group>
mounted() {
this.$refs.radio.$children.forEach((item) => {
item.$refs.radio.removeAttribute("aria-hidden");
});
}
3.方案三,换浏览器
换一个浏览器,我开始使用谷歌,后面改为edge,没报错了
标签:el,because,received,aria,element,item,radio,报错,hidden From: https://blog.csdn.net/qq_55121347/article/details/141400995