el-select 再添加 filterable属性支持输入搜索时,在ios上无法拉起键盘
解决
<el-selectref="selectRef"v-model="item.appId"clearable:filter-method="searchAppName"filterableplaceholder="请输入产品"@hoot="setFocus"@visible-change="setFocus">
js
import { reactive, ref, nextTick, onMounted } from 'vue'
const selectRef = ref(null)
const { proxy } = getCurrentInstance() //获取全局setFocus: (value) => {nextTick(() => {if (!value) {setTimeout(() => {viewsOperate.delRead()}, 700)}})
},delRead: () => {const { selectRef } = proxy.$refsconsole.log(selectRef[0])if (selectRef[0]) {const input = selectRef[0].$el.querySelector('.el-input__inner') //这里需要打印出dom元素才算正常,如果拿不到使用原生的 document.getElementByIdif (input) {console.log(input)input.removeAttribute('readonly')}}},