From 7b3fb33a2429f2de9fcb470480bd3c4e5b0ba596 Mon Sep 17 00:00:00 2001 From: pangxingyue <120277894@qq.com> Date: Thu, 11 Mar 2021 17:33:35 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=91=E5=90=ACinput=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E6=BB=9A=E5=8A=A8=E5=88=B0=E5=8F=AF=E8=A7=86=E5=8C=BA=E5=9F=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.js | 10 +++++++++- src/views/ebiz/insureAgain/insureInformation.vue | 8 -------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main.js b/src/main.js index cf578a581..89e874426 100644 --- a/src/main.js +++ b/src/main.js @@ -103,7 +103,15 @@ permission() //ios点击300毫秒时延 FastClick.attach(document.body) - +// 监听input弹窗滚动到可视区域 +window.addEventListener('resize', function () { + if (document.activeElement.tagName === 'INPUT' || document.activeElement.tagName === 'TEXTAREA') { + console.log('asdasdaaaaaaaaaaaa======================') + window.setTimeout(function () { + document.activeElement.scrollIntoViewIfNeeded() + }, 0) + } +}) Vue.config.productionTip = false new Vue({ router, diff --git a/src/views/ebiz/insureAgain/insureInformation.vue b/src/views/ebiz/insureAgain/insureInformation.vue index ad04da030..3dd181500 100644 --- a/src/views/ebiz/insureAgain/insureInformation.vue +++ b/src/views/ebiz/insureAgain/insureInformation.vue @@ -190,14 +190,6 @@ export default { }) }, 100) window.appCallBack = this.appCallBack - window.addEventListener('resize', function () { - if (document.activeElement.tagName === 'INPUT' || document.activeElement.tagName === 'TEXTAREA') { - console.log('asdasdaaaaaaaaaaaa======================') - window.setTimeout(function () { - document.activeElement.scrollIntoViewIfNeeded() - }, 0) - } - }) }, methods: { /**