移动端fixed定位按钮在底部,键盘弹起,不让底部按钮顶上去

//检测浏览器的resize事件,当按钮高度过小时就可以判定为出现这种情况,这时把按钮直接隐藏掉之类的

data(){
return{
isOriginHei: true,
screenHeight: window.innnerHeight || document.documentElement.clientHeight || document.body.clientHeight,
originHeight: window.innnerHeight || document.documentElement.clientHeight || document.body.clientHeight
}
}

watch: {
screenHeight(val){
If(this.isOriginHei > val + 100){
this.isOriginHei = false;
} else{
this.isOriginHei = true;
}
}
},
mounted(){
let self = this;
window.onresize = function(){
return (
function(){
self.screenHeight=window.innnerHeight || document.documentElement.clientHeight || document.body.clientHeight
}
)()
}
}

  

转载于:https://www.cnblogs.com/wangge001/p/10131045.html

你可能感兴趣的:(移动端fixed定位按钮在底部,键盘弹起,不让底部按钮顶上去)