From 0959da27baea7266539b4f1f847dbdab84095904 Mon Sep 17 00:00:00 2001 From: zhouxueli <2841188632@qq.com> Date: Mon, 28 Aug 2023 15:05:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=B8=E6=9C=BA=E7=AE=A1=E7=90=86=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=8A=A0=E8=BD=BD=E5=AE=8C=E4=B9=8B=E5=90=8E=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E6=B2=A1=E6=9C=89=E6=9B=B4=E5=A4=9A=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/index/driverManage.vue | 92 +++++++++++++++++++------------- 1 file changed, 56 insertions(+), 36 deletions(-) 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() + // } + // }, } }