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 {
|
} else {
|
||||||
isAnimating = false;
|
isAnimating = false;
|
||||||
currentIndex = index;
|
currentIndex = index;
|
||||||
|
// 给当前及之前所有卡片加 in-view,确保内容可见
|
||||||
|
snapTargets.forEach((t, i) => {
|
||||||
|
if (i <= index) t.classList.add('in-view');
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
animFrame = requestAnimationFrame(step);
|
animFrame = requestAnimationFrame(step);
|
||||||
|
|
@ -1037,6 +1041,10 @@
|
||||||
|
|
||||||
// 初始化
|
// 初始化
|
||||||
currentIndex = findCurrentIndex();
|
currentIndex = findCurrentIndex();
|
||||||
|
// 初始就给当前屏加 in-view
|
||||||
|
snapTargets.forEach((t, i) => {
|
||||||
|
if (i <= currentIndex) t.classList.add('in-view');
|
||||||
|
});
|
||||||
|
|
||||||
// 完全接管触摸滚动 - 禁止原生滚动
|
// 完全接管触摸滚动 - 禁止原生滚动
|
||||||
let canScroll = true;
|
let canScroll = true;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue