import { h } from 'preact'; /** * 轮播组件 * @param cRef - 组件引用,其中导出了3个方法:handleNext,handlePrev,setShowIndex * 使用cRef.current.handleNext(),cRef.current.handlePrev(),cRef.current.setShowIndex(index)来调用 * @param children - 轮播元素 * @param defaultIndex - 默认展示元素的索引,从1开始 * @param compWidth - 轮播元素宽度 * @param compHeight - 轮播元素高度 * @param autoplay - 是否自动轮播 * @param switchDuration - 自动轮播切换间隔(>1000) * @param loop - 是否循环播放 * @param isVertical - 轮播元素滚动方向 * @param touchable - 是否允许手势切换 * @param onSlideChange - 切换元素后的回调函数 * @param onClick - 点击元素的回调函数 * @param touchSwitchDistance - 手势切换的距离,一个0-1的小数,代表拖动距离占父元素宽度的百分比 */ export declare function Carousel(props: { rootId?: string; rootClassName?: string; cRef?: any; children?: h.JSX.Element[] | HTMLElement[]; defaultIndex?: number; compWidth?: number; compHeight?: number; autoplay?: boolean; switchDuration?: number; loop?: boolean; isVertical?: boolean; touchable?: boolean; onSlideChange?: (index: number) => void; onClick?: (index: number) => void; touchSwitchDistance?: number; }): h.JSX.Element;