This commit is contained in:
xuhe@fangjia.com
2018-04-11 11:43:46 +08:00
parent 820d9c3c93
commit aaf18ddc54
5 changed files with 1537 additions and 526 deletions
+12
View File
@@ -159,6 +159,18 @@ new Vue({
}
}
});
var originalHeight=document.documentElement.clientHeight || document.body.clientHeight;
window.onresize=function(){
//软键盘弹起与隐藏 都会引起窗口的高度发生变化
var resizeHeight=document.documentElement.clientHeight || document.body.clientHeight;
if(resizeHeight*1<originalHeight*1){ //resizeHeight<originalHeight证明窗口被挤压了
plus.webview.currentWebview().setStyle({
height:originalHeight
});
}
}
</script>
</body>