滚动调用接口获取数据
<div @scroll="handleScroll">
</div>
handleScroll(event){
const {scrollTop,clientHeight,scrollHeight} = event.target
console.log('sssss', scrollTop, clientHeight, scrollHeight)
if (scrollTop + clientHeight >= scrollHeight){
this.page.pageNumber += 1
postAction('url', this.page).then(res => {
console.log('时间线', res)
var var1 = res.data.data.items
this.data = this.data.concat(var1)
console.log('this.datqa',this.data)
})
}
},