<template>
<div>
<div> //顶部固定区域
···
</div>
<div :style="obj" @scroll="listenScroll"> //滚动区域
···
<div>
</div>
</template>
<script>
export default {
name: \'Home\',
data() {
return {
winHei: screen.availHeight, //屏幕高度
obj:{
height: 0
},
pagenum:1,
pagesize: 10,
dataLIst:[]
}
},
mounted(){
let topH = document.getElementById(\'d-top\').offsetHeight; //获取顶部区域高度
this.obj.height = (this.winHei - topH) + \'px\'; //动态修改滚动区域高度