@zebra-ui/swiper
Version:
专为多端设计的高性能swiper轮播组件库,支持多种复杂的 3D swiper轮播效果。
19 lines (15 loc) • 600 B
text/typescript
import type { OnDocumentTouchStart } from '../../../types/components/core/events/on-document-touch-start'
import type { SwiperInterface } from '../../../types/swiper-class'
const onDocumentTouchStart: OnDocumentTouchStart = function (
this: SwiperInterface
) {
const swiper = this as SwiperInterface & {
documentTouchHandlerProceeded?: boolean
}
if (swiper.documentTouchHandlerProceeded) return
swiper.documentTouchHandlerProceeded = true
if (swiper.params.touchReleaseOnEdges) {
;(swiper.el as HTMLElement).style.touchAction = 'auto'
}
}
export default onDocumentTouchStart