1、iOS element ui el-select下拉框第一次选不中,点击两次才生效
解决方案
<style lang="scss">
/* element-ui 下拉框在ios上 点击两次才能选中 */
.el-scrollbar {
> .el-scrollbar__bar {
opacity: 1 !important;
}
}
</style>
2、iOS Element ui 当el-select 可输入时,ios端调不起键盘
<el-select @input="$forceUpdate()"
id="fuck"
ref="agentSelect" //重要
@hook:mounted="cancalReadOnly" //重要
@visible-change="cancalReadOnly" //重要
v-model="handoverEntryAdminEa.ea"
style="width: 190px"
filterable clearable size="small">
<el-option v-for="dict in EausrAll"
:key="dict.userId"
:label="dict.nickName"
:value="dict.userId" />
</el-select>
methods方法里面:
cancalReadOnly(onOff) {
debugger
this.$nextTick(() => {
if (!onOff) {
const Selects = this.$refs
console.log(Selects) // 如果只有1个下拉框,这段就足够了---start
if (Selects.agentSelect) {
const input = Selects.agentSelect[0].$el.querySelector('.el-input__inner')
input.removeAttribute('readonly')
// alert('11')
}
if (Selects.agent2Select) {
const input = Selects.agent2Select[0].$el.querySelector('.el-input__inner')
input.removeAttribute('readonly')
// alert('11')
}
if (Selects.agent3Select) {
const input = Selects.agent3Select[0].$el.querySelector('.el-input__inner')
input.removeAttribute('readonly')
// alert('11')
}
}
})
},
3、iOS 端 改变 placeholder样式
<style >
textarea::-webkit-input-placeholder {
color: #DCDFE6 !important;;
font-size: 13px;
}
textarea:-moz-placeholder {
color: #DCDFE6 !important;;
font-size: 13px;
}
textarea::-moz-placeholder {
color: #DCDFE6 !important;;
font-size: 13px;
}
textarea::-ms-input-placeholder {
color: #DCDFE6 !important;;
font-size: 13px;
}
</style>
更新中。。。