From e81ef0a3758037d7c0973abb6e0f561d2ca6056f Mon Sep 17 00:00:00 2001 From: zerosaturation Date: Wed, 13 May 2026 13:03:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E6=94=B9=E7=80=91=E5=B8=83?= =?UTF-8?q?=E6=B5=81ios=E7=9A=84=E6=8A=96=E5=8A=A8=E7=8E=B0=E8=B1=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 +--- frontend/pages/square/components/WaterfallGrid.vue | 14 +++++++------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 3b892a7..a2ad1c5 100644 --- a/README.md +++ b/README.md @@ -1,3 +1 @@ -# TopFans -密码:R251Y>Y8inL_BM=W -https://testflight.apple.com/join/znR5FGdG \ No newline at end of file +# TopFans \ No newline at end of file diff --git a/frontend/pages/square/components/WaterfallGrid.vue b/frontend/pages/square/components/WaterfallGrid.vue index b399161..1d16553 100644 --- a/frontend/pages/square/components/WaterfallGrid.vue +++ b/frontend/pages/square/components/WaterfallGrid.vue @@ -5,6 +5,7 @@ scroll-x :show-scrollbar="false" :scroll-left="isIOS ? undefined : scrollLeft" + :bounce="false" @scroll="onScroll" @touchstart="onTouchStart" @touchend="onTouchEnd" @@ -224,8 +225,8 @@ let isManualScrolling = false // 是否正在手动滚动 const onTouchStart = (e) => { if (isIOS) { - // iOS 设备:完全停止自动滚动 - stopIOSAutoScroll() + // iOS 设备:暂停 CSS 动画,让用户可以自由滚动 + pauseIOSAutoScroll() isManualScrolling = true clearTimeout(momentumTimer) } else { @@ -244,13 +245,12 @@ const onTouchEnd = () => { const tick = () => { momentumTimer = setTimeout(() => { if (Math.abs(currentScrollLeft - lastTouchEndPos) < 2) { - // 惯性真正结束,延迟 300ms 再恢复自动滚动(确保惯性完全停止) + // 惯性真正结束,等 500ms 确保惯性完全停止后再恢复 clearTimeout(momentumTimer) momentumTimer = setTimeout(() => { isManualScrolling = false - autoScrollPos = currentScrollLeft - startIOSAutoScroll() - }, 300) + resumeIOSAutoScroll() + }, 1500) } else { // 惯性中,更新快照继续检测 lastTouchEndPos = currentScrollLeft @@ -951,6 +951,7 @@ const loadUsersAndStartScroll = () => {