UNPKG

jamis

Version:

一种支持通过JSON配置方式生成页面的组件库

48 lines (47 loc) 1.83 kB
import React from 'react'; import type { ActionObject, IScopedContext, RendererProps } from 'jamis-core'; import { ScopedContext } from 'jamis-core'; import type { CarouselSchema } from './types'; interface CarouselProps extends RendererProps, Omit<CarouselSchema, 'className'> { value?: any; } interface CarouselState { current: number; options: any[]; nextAnimation: string; } export declare class Carousel extends React.Component<CarouselProps, CarouselState> { wrapperRef: React.RefObject<HTMLDivElement>; intervalTimeout: NodeJS.Timer | number; durationTimeout: NodeJS.Timer | number; static defaultProps: Pick<CarouselProps, 'auto' | 'interval' | 'duration' | 'controlsTheme' | 'animation' | 'controls' | 'placeholder'>; state: { current: number; options: any; nextAnimation: string; }; componentDidMount(): void; componentDidUpdate(prevProps: CarouselProps): void; componentWillUnmount(): void; doAction(action: ActionObject, args: object, throwErrors: boolean): any; prepareAutoSlide(): void; autoSlide(rel?: string): void; transitFramesTowards(direction: string, nextAnimation: string): Promise<void>; getFrameId(pos?: string): number; next(): void; prev(): void; clearAutoTimeout(): void; changeSlide(index: number): Promise<void>; renderDots(): JSX.Element; renderArrows(): JSX.Element; handleMouseEnter(): void; handleMouseLeave(): void; render(): JSX.Element; } export declare class CarouselRenderer extends Carousel { static contextType: React.Context<IScopedContext<import("jamis-core").ScopedComponentType>>; context: React.ContextType<typeof ScopedContext>; constructor(props: CarouselProps, context: IScopedContext); componentWillUnmount(): void; } export {};