this.screenWidth = document.body.clientWidth;
this.screenHeight = window.innerHeight
this.table_box2_height = window.innerHeight - 409 - 38 - 62
this.tab_box2_height = window.innerHeight - 614 - 30
window.onresize = () => {
return (() => {
this.screenWidth = document.body.clientWidth;
this.screenHeight = window.innerHeight
this.table_box2_height = window.innerHeight - 409 - 38 - 62
this.tab_box2_height = window.innerHeight - 614 - 30
})()
}
可以根据浏览器窗口高度来设定一个阈值,避免高度过低 各元素出现过于挤的这种情况