From 6fa4213a45e15b03260e85aa5f8d7bb5f944f175 Mon Sep 17 00:00:00 2001 From: luobinjie Date: Tue, 13 Jan 2026 16:10:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E5=91=98=E7=99=BB=E8=AE=B0=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E8=99=9A=E6=8B=9F=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../patientRegister/PatientRegisterList.vue | 28 ++++++++++++------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/src/components/patientRegister/PatientRegisterList.vue b/src/components/patientRegister/PatientRegisterList.vue index 74f801d..a3b1bd4 100644 --- a/src/components/patientRegister/PatientRegisterList.vue +++ b/src/components/patientRegister/PatientRegisterList.vue @@ -1758,6 +1758,7 @@ export default { async load() { this.loadOpts.skipCount++; await this.getPrList(); + this.lazyLoading = false; }, // 获取列表数据 @@ -1967,16 +1968,23 @@ export default { //滚动加载数据 async scrollFull(scroll, event) { - if (scroll.judgeFlse) { - if ( - (Number(this.loadOpts.skipCount) + 1) * - Number(this.loadOpts.maxResultCount) >= - Number(this.loadOpts.totalCount) - ) { - return; - } else { - await this.load(); - } + if (!scroll.judgeFlse) return; + + // 正在加载时阻止重复触发 + if (this.lazyLoading) return; + if ( + (Number(this.loadOpts.skipCount) + 1) * + Number(this.loadOpts.maxResultCount) >= + Number(this.loadOpts.totalCount) + ) { + return; + } + + this.lazyLoading = true; + try { + await this.load(); + } catch (e) { + console.error('scrollFull load error', e); } // this.dom = this.$refs.info.bodyWrapper // console.log('this.dom', this.dom)