js部分
data() {
return {
hidshow: true // 显示或者隐藏底部提交部分
};
},
mounted() {
const ua = window.navigator.userAgent;
if (ua.indexOf(‘Android’) > -1 || ua.indexOf(‘iPhone’) > -1) {
const docmHeight = document.body.clientHeight;// 默认屏幕高度
window.onresize = () => {
var nowHeight = document.body.clientHeight;// 实时屏幕高度
if (docmHeight !== nowHeight) {
this.hidshow = false;
} else {
this.hidshow = true;
}
};
}
},
vue部分
vue input唤起键盘 底部固定的按钮等标签被顶上去
最新推荐文章于 2024-07-19 20:58:05 发布