From c4155bb364241afa7e98916b4c5da89a698065f2 Mon Sep 17 00:00:00 2001 From: "851673013@qq.com" <851673013@qq.com> Date: Tue, 9 Aug 2022 18:15:16 +0800 Subject: [PATCH] =?UTF-8?q?=E8=83=BD=E5=8A=9B=E5=B9=BF=E5=9C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/src/views/capacitySquare/components/algorithm.vue | 5 ++++- front/src/views/capacitySquare/components/layer.vue | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/front/src/views/capacitySquare/components/algorithm.vue b/front/src/views/capacitySquare/components/algorithm.vue index dadd7f2d..57e4004d 100644 --- a/front/src/views/capacitySquare/components/algorithm.vue +++ b/front/src/views/capacitySquare/components/algorithm.vue @@ -75,7 +75,10 @@ var windowHeight = e.currentTarget.clientHeight var scrollHeight = e.currentTarget.scrollHeight console.log(scrollTop, windowHeight, scrollHeight, '123') - if (scrollTop + windowHeight == scrollHeight) { + if ( + scrollTop + windowHeight <= scrollHeight + 1 && + scrollTop + windowHeight >= scrollHeight - 1 + ) { // 当前滚动条已经触底 isNoMore.value = true params.pageNum++ diff --git a/front/src/views/capacitySquare/components/layer.vue b/front/src/views/capacitySquare/components/layer.vue index 78a33f3c..2b9e03b5 100644 --- a/front/src/views/capacitySquare/components/layer.vue +++ b/front/src/views/capacitySquare/components/layer.vue @@ -75,7 +75,10 @@ var windowHeight = e.currentTarget.clientHeight var scrollHeight = e.currentTarget.scrollHeight console.log(scrollTop, windowHeight, scrollHeight, '123') - if (scrollTop + windowHeight == scrollHeight) { + if ( + scrollTop + windowHeight <= scrollHeight + 1 && + scrollTop + windowHeight >= scrollHeight - 1 + ) { // 当前滚动条已经触底 isNoMore.value = true params.pageNum++