2022-11-02 16:25:28 +08:00
|
|
|
import type { ReactNode } from 'react';
|
|
|
|
import type {
|
|
|
|
TourProps as RCTourProps,
|
|
|
|
TourStepProps as RCTourStepProps,
|
|
|
|
} from '@rc-component/tour';
|
|
|
|
|
2022-11-30 11:05:41 +08:00
|
|
|
export interface TourProps extends Omit<RCTourProps, 'renderPanel'> {
|
2022-11-02 16:25:28 +08:00
|
|
|
steps?: TourStepProps[];
|
|
|
|
className?: string;
|
|
|
|
prefixCls?: string;
|
|
|
|
current?: number;
|
|
|
|
stepRender?: (current: number, total: number) => ReactNode;
|
|
|
|
type?: 'default' | 'primary'; // default 类型,影响底色与文字颜色
|
2022-11-30 11:05:41 +08:00
|
|
|
}
|
2022-11-02 16:25:28 +08:00
|
|
|
|
|
|
|
export interface TourStepProps extends RCTourStepProps {
|
|
|
|
cover?: ReactNode; // 展示的图片或者视频
|
|
|
|
nextButtonProps?: { children?: ReactNode; onClick?: () => void };
|
|
|
|
prevButtonProps?: { children?: ReactNode; onClick?: () => void };
|
|
|
|
stepRender?: (current: number, total: number) => ReactNode;
|
|
|
|
type?: 'default' | 'primary'; // default 类型,影响底色与文字颜色
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface TourLocale {
|
|
|
|
Next: string;
|
|
|
|
Previous: string;
|
|
|
|
Finish: string;
|
|
|
|
}
|