web:InfiniteScroll 无限滚动
InfiniteScroll 无限滚动
分页加载
<div class="data-box" v-infinite-scroll="loadMore">
<li v-for='i in dataList'></li>
</div>form: {current: 1,size: 10,}loadMore(){console.log(this.dataList.length, this.total ,8888)if(this.dataList.length >= this.total){return}this.form.current = this.form.current + 1this.getDataList()},getDataList() {getList(this.form).then(res => {this.dataList = this.dataList.concat(res.result.records)console.log(this.dataList,66666)this.total = res.result.total})},