onSwipe is not working
未关闭
- 主要语言
- JavaScript
- 星标
- 11.9k
- 派生
- 2.1k
- PR 合并指标
- 30 天内没有已合并 PR
描述
I need to determine if the swiper changes via swipe and when I try to use onSwipe, it does not fire.
```
const settings = {
dots: false,
arrows: false,
autoplay: false,
slidesToShow: 1,
slidesToScroll: 1,
swipe: true
swipeToSlide: true
onSwipe: (direction) => {
console.log("Swipe direction:", direction);
if (direction === "left") {
console.log("Swiped left!");
} else if (direction === "right") {
console.log("Swiped right!");
}
},
}
```
贡献指南
评估
这个 Issue 还没有评估数据。