Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
ufo-app-web
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
TaoHuang
6 years ago
Commit
9f929e4d923997f28f0d8bf828f80133b642cff3
1 parent
6cae6665
fix input
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletions
apps/pages/single/order/ufo/components/modal-price.vue
apps/pages/single/order/ufo/components/modal-price.vue
View file @
9f929e4
...
...
@@ -55,6 +55,7 @@ export default {
},
mounted() {
this.inputChange = debounce(this.onChange.bind(this), 500);
this.init();
},
watch: {
chgPrice(newVal) {
...
...
@@ -180,7 +181,24 @@ export default {
this.$root.reportApp('', 'BUSINESS_UFO_SELL_CHANGE', {
locfun: 'click:changePrice:no'
});
}
},
init() {
let myFunction;
if (this.$yoho.isiOS) { // 是ios============(因为查到只有在微信环境下,ios手机上才会出现input失去焦点的时候页面被顶起)
document.body.addEventListener('focusin', () => { // 软键盘弹起事件
clearTimeout(myFunction);
});
document.body.addEventListener('focusout', () => { // 软键盘关闭事件
clearTimeout(myFunction);
myFunction = setTimeout(function() {
window.scrollTo({top: 0, left: 0, behavior: 'smooth'})// 重点 =======当键盘收起的时候让页面回到原始位置
}, 200);
})
}
},
},
components: {Modal, InputUfo}
};
...
...
Please
register
or
login
to post a comment