1
<p class="updataPhone" v-if="hidshow"> 手机号填错了? </p>
2
data () {
return {
docmHeight:0, //默认屏幕高度
hidshow:true //显示或者隐藏footer
};
},
3
mounted() {
this.docmHeight = document.documentElement.clientHeight;//获取当前屏幕高度
window.onresize = () => {//屏幕高度变化时判断
return (() => {
let showHeight = document.body.clientHeight;
this.hidshow = this.docmHeight > showHeight ? false : true;
})();
};
}
完美解决~~欧耶欧耶欧耶