diff --git a/src/main.js b/src/main.js index 7e01c0eca..73f173660 100644 --- a/src/main.js +++ b/src/main.js @@ -132,7 +132,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: { /**