zoukankan      html  css  js  c++  java
  • 在APP中ios输入账号和密码时键盘闪烁

    在APP中 ios手机 用户打开默认的自动识别密码,会出现调起键盘输入密码时 键盘一直闪烁的bug

    解决方法:1用户在ios系统的设置中 自己关闭自动识别密码 (这种问题建议还是开发解决吧,用户体验不好,,,)

    第二种解决方法:

    下面以vant组件使用为例

    这是一个登陆页 一开始这样写就  用户打开默认的自动识别密码,会出现调起键盘输入密码时 键盘一直闪烁的bug

    <section class="login-bar">
      <div class="login-input van-hairline--bottom">
        <van-field v-model="phone" type="tel" clearable maxlength="11" placeholder="请输入您的ID或手机号" :border="false"
          size="large"  autocomplete="off" />
      </div>
      <div class="login-input van-hairline--bottom">
        <van-field class="p-input" v-model="password" maxlength="16" :type="inputType" clearable placeholder="请输入您的密码"
          :border="false" size="large"  autocomplete="off"/>
      </div>
    </section>

    解决方法就是 在第一个输入框也就是输入手机号的输入框下面加一个输入框并隐藏  在输入密码的输入框上方加一个输入框隐藏 即可解决

    给类名hide-input   加上样式:  这样即可

    .hide-input {
      0;
      opacity:0;
    }
    <section class="login-bar">
      <div class="login-input van-hairline--bottom">
        <van-field v-model="phone" type="tel" clearable maxlength="11" placeholder="请输入您的ID或手机号" :border="false"
          size="large"  autocomplete="off" />
          // 下方添加输入框
        <van-field v-model="phone" type="tel" clearable maxlength="11" placeholder="请输入您的ID或手机号" :border="false"
        size="large"  autocomplete="off"  class="hide-input"/>
      </div>
      <div class="login-input van-hairline--bottom">
      //上方添加输入框
        <van-field class="hide-input" style="display:none" v-model="password" maxlength="16" :type="inputType" clearable placeholder="请输入您的密码"
          :border="false" size="large"  autocomplete="off" />
        <van-field class="p-input" v-model="password" maxlength="16" :type="inputType" clearable placeholder="请输入您的密码"
          :border="false" size="large"  autocomplete="off"/>
      </div>
    </section>
  • 相关阅读:
    TP连接数据库报错:SQLSTATE[HY000] [2002] No such file or directory (原)
    linux的查找命令 find whereis locate
    windows下cmd无法使用telnet命令解决方法 (原)
    CDN和智能DNS原理和应用 (原)
    面试:sql语句-1-基础查询
    面试问题:对框架的理解
    Hub,bridge,switch and router的区别
    If you ever have a broken heart
    virt-viewer的简单使用
    各种虚拟化镜像文件格式
  • 原文地址:https://www.cnblogs.com/toughy/p/13151136.html
Copyright © 2011-2022 走看看