fix: restore in-view class assignment so pain-point content is visible on mobile
This commit is contained in:
parent
c705bc96e9
commit
9accd17836
|
|
@ -1030,6 +1030,10 @@
|
|||
} else {
|
||||
isAnimating = false;
|
||||
currentIndex = index;
|
||||
// 给当前及之前所有卡片加 in-view,确保内容可见
|
||||
snapTargets.forEach((t, i) => {
|
||||
if (i <= index) t.classList.add('in-view');
|
||||
});
|
||||
}
|
||||
}
|
||||
animFrame = requestAnimationFrame(step);
|
||||
|
|
@ -1037,6 +1041,10 @@
|
|||
|
||||
// 初始化
|
||||
currentIndex = findCurrentIndex();
|
||||
// 初始就给当前屏加 in-view
|
||||
snapTargets.forEach((t, i) => {
|
||||
if (i <= currentIndex) t.classList.add('in-view');
|
||||
});
|
||||
|
||||
// 完全接管触摸滚动 - 禁止原生滚动
|
||||
let canScroll = true;
|
||||
|
|
|
|||
Loading…
Reference in New Issue