onClick.js 322 B

12345678910111213
  1. export default function onClick(e) {
  2. const swiper = this;
  3. if (!swiper.enabled) return;
  4. if (!swiper.allowClick) {
  5. if (swiper.params.preventClicks) e.preventDefault();
  6. if (swiper.params.preventClicksPropagation && swiper.animating) {
  7. e.stopPropagation();
  8. e.stopImmediatePropagation();
  9. }
  10. }
  11. }