@jdcfe/yep-react
Version:
一套移动端的React组件库
77 lines (76 loc) • 2.81 kB
TypeScript
import * as React from 'react';
import { CarouselProps } from './types';
declare class Carousel extends React.Component<CarouselProps, any> {
static defaultProps: {
prefixCls: string;
style: {};
dots: boolean;
showPager: boolean;
isInfinite: boolean;
initPage: number;
vertical: boolean;
verticalSwipe: string;
width: string;
autoPlay: boolean;
transitionTime: number;
distance: number;
dynamicHeight: boolean;
onClickItem: () => null;
onClickThumb: () => null;
onChange: () => null;
renderPage: (current: number, total: number) => string;
centerMode: boolean;
centerSlidePercentage: number;
onSwipeStart: () => void;
onSwipeEnd: () => void;
onSwipeMove: () => void;
renderIndicator: (onClickHandler: any, isSelected: boolean, index: number, label: any) => JSX.Element;
renderItem: (item: any) => any;
};
constructor(props: CarouselProps);
carouselWrapperRef: any;
listRef: any;
itemsWrapperRef: any;
itemsRef: any;
timer: any;
componentDidMount(): void;
componentDidUpdate(prevProps: CarouselProps, prevState: any): void;
componentWillUnmount(): void;
setCarouselWrapperRef: (node: any) => void;
setListRef: (node: any) => void;
setItemsWrapperRef: (node: any) => void;
setItemsRef: (node: any, index: number) => void;
setupCarousel(): void;
destroyCarousel(): void;
setupAutoPlay(): void;
destroyAutoPlay(): void;
bindEvents(): void;
unbindEvents(): void;
autoPlay: () => void;
clearAutoPlay: () => void;
resetAutoPlay: () => void;
updateSizes: () => void;
setMountState: () => void;
handleClickItem: (index: number, item: any) => void;
handleOnChange: (index: number, item: any) => void;
onSwipeStart: (event: any) => void;
onSwipeEnd: (event: any) => void;
onSwipeMove: (delta: any, event: any) => boolean;
getPosition: (index: number) => number;
setPosition: (position: React.ReactText, forceReflow: boolean) => void;
resetPosition: () => void;
decrement: (positions?: number, fromSwipe?: boolean) => void;
increment: (positions?: number, fromSwipe?: boolean) => void;
moveTo: (position: number, fromSwipe?: boolean | undefined) => void;
onSwipeForward: () => void;
onSwipeBackwards: () => void;
changeItem: (e: any) => void;
selectItem: (state: any, cb: any) => void;
getInitialImage: () => any;
getVariableImageHeight: (position: number) => any;
renderItems(isClone?: boolean): JSX.Element[];
renderControls(): JSX.Element | null;
renderStatus(): JSX.Element | null;
render(): JSX.Element | null;
}
export default Carousel;