Swiper:如何判断事件的类型?

Swiper: How to determine the type of event?

我正在为 React 使用 Swiper。

如果用户滑动并使用按钮更改活动幻灯片,我需要使用不同的效果。

我在滑动对象中查看了有关事件类型的信息,但找不到任何信息:

<StyledWidgetRecentJoins
  onTransitionEnd={(swiper) => {
    console.log(swiper);
  }}
>
  //
</StyledWidgetRecentJoins>

如何判断事件类型?

Swiper API 文档为您提供了一堆您可以收听的有用事件。

你可以选择你想听的。查看此 link 以获取信息 - https://swiperjs.com/swiper-api#events