ios移动端常见兼容问题

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>

更新中。。。

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值