tsp-component
Version:
提供多端和react版本的UI组件
61 lines (56 loc) • 1.1 kB
TypeScript
interface TspComponentCarouselProps {
className?: string;
id?: string;
// id: string;
direction?: TspComponentSliderModel;
/**
* 当前选中的索引
*/
selectedIndex?: number;
/**
* 组件宽度
*/
width?: number;
/**
* 组件高度
*/
height?: number;
/**
* 滑动完成后触发的事件
*/
afterChange?: (indexs: TspComponentSliderAfterChangeReturn, isAuto: boolean) => void;
/**
* 左箭头
*/
leftArrow?: any;
/**
* 右箭头
*/
rightArrow?: any;
/**
* 是否开启索引点
*/
dots?: boolean;
/**
* 更新Id,用于判断子元素是否更新,只有refreshId和下一次selectedId相同时才会触发刷新UI
*/
refreshId?: number;
/**
* 容器高度自动适应
*/
autoHeight?: boolean;
/**
* 是否开启滑动
*/
swipeable?: boolean;
/**
* 自动轮播的间隔
*/
autoplayInterval?: number;
/**
* 点击回调
*/
onClick?: (selectedIndex: number) => void;
}
interface TspComponentCarouselState {
}