ElementUI的Select组件在IOS唤不起软键盘

el-select上加上@focus="closeReadOnly" @blur="closeReadOnly",然后写下面的方法

closeReadOnly() {      // 去除el-select默认的readOnly,否则移动端下拉框出不来      Array.from(document.getElementsByClassName('el-select')).forEach(item => {        item.children[0].children[0].removeAttribute('readOnly');        item.children[0].children[0].onblur = function () {          let _this = this;          _this.removeAttribute('readOnly');        }      });},
(0)

相关推荐