/** * @author Hanz * @date 2022/2/28 上午11:02 * @description Carousel */ import React from 'react'; import { Settings } from 'react-slick'; import './index.scss'; export type CarouselEffect = 'scrollx' | 'fade'; export type DotPosition = 'top' | 'bottom' | 'left' | 'right'; export interface CarouselProps extends Omit { /** 动画效果函数 */ effect?: CarouselEffect; /** style */ style?: React.CSSProperties; /** 面板指示点位置 */ dotPosition?: DotPosition; /** 内容节点 */ children?: React.ReactNode; /** 是否显示面板指示点 */ dots?: boolean | { className?: string; }; } export interface CarouselRef { /** 切换到指定面板,dontAnimate = true 时,不使用动画 */ goTo: (slide: number, dontAnimate?: boolean) => void; /** 切换到下一面板 */ next: () => void; /** 切换到上一面板 */ prev: () => void; /** 播放动画 */ play: () => void; /** 暂停动画 */ pause: () => void; } export declare const Carousel: React.ForwardRefExoticComponent>; export default Carousel;