From 1d352cf62032c70616f8630be17939e805eefaee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E5=AE=9C=E6=B3=A2?= <760478279@qq.com> Date: Wed, 16 Jul 2025 10:48:14 +0800 Subject: [PATCH] =?UTF-8?q?fix(BubbleList):=20=20=E6=BB=9A=E5=8A=A8?= =?UTF-8?q?=E8=BF=87=E7=A8=8B=E7=9A=84=E6=BB=9A=E5=8A=A8=E8=B7=9D=E7=A6=BB?= =?UTF-8?q?=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/core/src/components/BubbleList/index.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/core/src/components/BubbleList/index.vue b/packages/core/src/components/BubbleList/index.vue index 0f319a30..ad9647ca 100644 --- a/packages/core/src/components/BubbleList/index.vue +++ b/packages/core/src/components/BubbleList/index.vue @@ -175,6 +175,12 @@ function handleScroll() { showBackToBottom.value = props.showBackButton && distanceToBottom > props.backButtonThreshold; + // 处理 lastScrollTop.value 安全距离(scrollHeight 在滚动过程中变小) + const maxScrollTop = scrollHeight - clientHeight; + if (lastScrollTop.value > maxScrollTop) { + lastScrollTop.value = maxScrollTop; + } + // 判断是否距离底部小于阈值 (这里吸附值大一些会体验更好) const isCloseToBottom = scrollTop + clientHeight >= scrollHeight - 30; // 判断用户是否向上滚动