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
})()
}
可以根據瀏覽器窗口高度來設定一個閾值,避免高度過低 各元素出現過於擠的這種情況