@zebra-ui/swiper
Version:
专为多端设计的高性能swiper轮播组件库,支持多种复杂的 3D swiper轮播效果。
48 lines (40 loc) • 1.22 kB
TypeScript
import type Swiper from '../swiper-class.d.ts'
export interface ControllerMethods {
/**
* Pass here another Swiper instance or array with Swiper instances that should be controlled
* by this Swiper
*/
control?: Swiper | Swiper[] | string | HTMLElement | null
}
export interface ControllerEvents {}
export interface ControllerOptions {
/**
* Pass here another Swiper instance or array with Swiper instances that should be controlled
* by this Swiper. Also accepts string with CSS selector of Swiper element, or HTMLElement of Swiper element
*/
control?: Swiper | Swiper[] | string | HTMLElement | null
/**
* Set to `true` and controlling will be in inverse direction
*
* @default false
*/
inverse?: boolean
/**
* Defines a way how to control another slider: slide by slide
* (with respect to other slider's grid) or depending on all slides/container
* (depending on total slider percentage).
*
* @default 'slide'
*/
by?: 'slide' | 'container'
}
interface LinearSpline {
x: number[]
y: number[]
lastIndex: number
interpolate(x: number): number
}
export interface Controller {
control?: Swiper | Swiper[] | null
spline?: LinearSpline
}