<template>
<el-select
ref="select"
@hook:mounted="cancalReadOnly"
@visible-change="cancalReadOnly"
>
</el-select>
</template>
<script>
export default {
methods: {
cancalReadOnly(onOff) {
this.$nextTick(() => {
if (!onOff) {
const {select} = this.$refs;
const input = select.$el.querySelector('.el-input__inner');
input.removeAttribute('readonly');
}
});
}
}
}
</script>
https://my.oschina.net/u/560237/blog/4891996
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请
点击举报。