import type { CustomEvent } from "../../constructors/events"; declare const swiperEasingFunction: readonly [ "default", "linear", "easeInCubic", "easeOutCubic", "easeInOutCubic" ]; declare const source: readonly [ "touch", "autoplay" ]; /** * @value 'default' 默认缓动函数 * @value 'linear' 线性动画 * @value 'easeInCubic' 缓入动画 * @value 'easeOutCubic' 缓出动画 * @value 'easeInOutCubic' 缓入缓出动画 */ declare type SwiperEasingFunction = typeof swiperEasingFunction[number]; /** * @value 'touch' 用户划动引起swiper变化 * @value 'autoplay' 自动播放导致swiper变化 */ declare type SourceType = typeof source[number]; declare const indicatorStyles: readonly [ "dot", "common" ]; declare type IndicatorStyle = typeof indicatorStyles[number]; declare const placements: readonly [ "inner", "outer" ]; declare type Placement = typeof placements[number]; /** * 滑块视图容器。其中只可放置 swiper-item 组件,否则会导致未定义的行为 * * @version {"kma":"1.26.1","ide":"1.22.0"} * */ export declare interface SwiperProps { /** * 是否显示面板指示点 */ indicatorDots?: boolean; /** * 指示点样式,默认为dot */ indicatorStyle?: IndicatorStyle; /** * 指示点颜色, indicatorStyle='dot'时默认值为#C6C6C6, indicatorStyle='common'时默认值为#ffffff80 */ indicatorColor?: string; /** * 当前选中的指示点颜色,indicatorStyle='dot'时默认值为#000000, indicatorStyle='common'时默认值为#ffffff */ indicatorActiveColor?: string; /** * 是否自动切换 */ autoplay?: boolean; /** * 当前所在滑块的 index */ current?: number; /** * 自动切换时间间隔 */ interval?: number; /** * 滑动动画时长 */ duration?: number; /** * 是否采用衔接滑动 */ circular?: boolean; /** * 滑动方向是否为纵向 */ vertical?: boolean; /** * 前边距,可用于露出前一项的一小部分,接受 px 和 rpx 值 * @alpha */ previousMargin?: string; /** * 后边距,可用于露出后一项的一小部分,接受 px 和 rpx 值 * @alpha */ nextMargin?: string; /** * 同时显示的滑块数量 * @alpha */ displayMultipleItems?: number; /** * 指定 swiper 切换缓动动画类型 */ easingFunction?: SwiperEasingFunction; /** * 指定指示器位置 */ placement?: Placement; /** * 指定指示器显示个数,默认为5,为"fit"为当前SwiperItem个数。仅对indicatorStyle="dot"生效 */ indicatorShowNumber?: number | 'fit'; /** * current 改变时会触发 change 事件,event.detail = {current, source} */ onChange?: (event: CustomEvent<{ current: number; source: SourceType; }>) => void; /** * swiper-item 的位置发生改变时会触发 transition 事件,event.detail = {dx: dx, dy: dy} */ onTransition?: (event: CustomEvent<{ dx: number; dy: number; }>) => void; /** * 动画结束时会触发 animationfinish 事件,event.detail 同上 */ onAnimationFinish?: (event: CustomEvent<{ dx: number; dy: number; }>) => void; } export {};