Swiper Slider:如何在过渡期间禁用 "swiping" 和 "mouse wheel scrolling"?

Swiper Slider: How to disable "swiping" and "mouse wheel scrolling" during the transition?

我有一个关于 Swiper Slider 的问题。是否可以在过渡开始时禁用“滑动”和“鼠标滚轮滚动”,并在过渡结束时再次启用它?像那样的东西。这是为了防止用户在幻灯片之间滚动或滑动过快。

谢谢。

是的。通过 API 参数: preventInteractionOnTransition: true;

(默认为false)。

When enabled it won't allow changing slides by swiping or navigation/pagination buttons during transition https://swiperjs.com/api/#parameters