模板:
<div class="bottomBox" :style="{ height: bottomBoxheight + 'px' }">
<router-view></router-view>
</div>
js:
mounted() {
this.bottomBoxheight = document.getElementById("leftmenu").offsetHeight - 120;
window.addEventListener('resize',this.handleResize)
},
methods: {
handleResize(){
this.bottomBoxheight = document.getElementById("leftmenu").offsetHeight - 120;
},