获取窗口浏览器的高度。并把页面的高度设成此高度

this.clientheight=document.documentElement.clientHeight-230;//获取屏幕的高度。-230是因为页面的内容可能有其他的部分,当前部分的高度要减去那个部分

<div v-loading="listLoadingRole" style="overflow-y:scroll;" :style="{height:clientheight+'px'}">

             ·····需要加滚动条的部分

</div>

猜你喜欢

转载自blog.csdn.net/qq_33769914/article/details/83537498