@zebra-ui/swiper
Version:
专为多端设计的高性能swiper轮播组件库,支持多种复杂的 3D swiper轮播效果。
18 lines (14 loc) • 513 B
text/typescript
import type { OnClick } from '../../../types/components/core/events/on-click'
import type { SwiperInterface } from '../../../types/swiper-class'
const onClick: OnClick = function (this: SwiperInterface, e) {
const swiper = this
if (!swiper.enabled) return
if (!swiper.allowClick) {
if (swiper.params.preventClicks) e.preventDefault()
if (swiper.params.preventClicksPropagation && swiper.animating) {
e.stopPropagation()
e.stopImmediatePropagation()
}
}
}
export default onClick