Apple mobile phone vue pages pop the input loses focus shift caused by the page

Problem: Apple phone vue pages pop when the input loses focus shift caused by the page

solve:

<input type="text" class="userNameInput" v-model="username" placeholder="请输入账号或手机号" @blur="coverScroll">

<input type="password" class="passInput" v-model="password" placeholder="请输入密码" @blur="coverScroll">

//苹果手机获取焦点时屏幕上移
coverScroll(){
    window.scroll(0, 0);
},

Published 20 original articles · won praise 0 · Views 121

Guess you like

Origin blog.csdn.net/qq_2422941992/article/details/104219606