diff --git a/src/views/index/driverManage.vue b/src/views/index/driverManage.vue index 9ad32d59..7392d7fa 100644 --- a/src/views/index/driverManage.vue +++ b/src/views/index/driverManage.vue @@ -1,5 +1,5 @@ @@ -68,6 +76,8 @@ export default { supplierType:'', count: 0, isLoading: false, + loading1: false, + finished: false } }, mounted() { @@ -77,6 +87,16 @@ export default { this.getDriverList() }, methods:{ + async onLoad(){ + this.pageNum++; + await this.getDriverList() + // 加载状态结束 + this.loading1 = false; + // 数据全部加载完成 + if (this.driverList.length >= this.total) { + this.finished = true; + } + }, onRefresh() { this.getDriverList() setTimeout(() => { @@ -143,15 +163,15 @@ export default { } }); }, - async handleScroll(){ - let num = Math.ceil( this.total / 10) - if(num <= this.pageNum){ - // console.log("不在加载数据") - }else{ - this.pageNum++; - await this.getDriverList() - } - }, + // async handleScroll(){ + // let num = Math.ceil( this.total / 10) + // if(num <= this.pageNum){ + // // console.log("不在加载数据") + // }else{ + // this.pageNum++; + // await this.getDriverList() + // } + // }, } }