苹果手机文本框输入完毕后隐藏键盘后留白的处理方法

苹果手机文本框输入完毕后隐藏键盘后留白的处理方法

给文本框添加失去焦点事件

<input
  class="center-text"
  type="text"
  @blur="textBlur"
  v-model="parameter.phoneNo"
  placeholder="请输入手机号码"
  maxlength="11"/>

失去焦点事件

textBlur(){
      document.body.scrollTop = document.body.scrollHeight;
    }

猜你喜欢

转载自blog.csdn.net/weixin_43059031/article/details/85689790
今日推荐