- //input 唤醒软键盘屏幕被遮盖解决方案
- if (document.querySelectorAll('input').length) {
- let btns = document.querySelectorAll('input');
- for (var i = 0; i <btns.length; i++) {
- btns[i].addEventListener('focus', function (e) {
- Windows.setTimeout(()=>{
- Windows.scrollTo(0, 0)
- },100)
- })
- btns[i].addEventListener('blur', function (e) {
- Windows.setTimeout(()=>{
- Windows.scrollTo(0, 0)
- },100)
- })
- }
- }
以上代码就可以解决了
来源: http://www.bubuko.com/infodetail-3119293.html