forked from ant-design/ant-design-mini
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprops.ts
109 lines (105 loc) · 1.94 KB
/
props.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
import { IBaseProps } from '../_util/base';
interface IStep {
/**
* @description 图片地址
*/
imageUrl: string;
/**
* @description 图片模式
*/
imageMode: string;
/**
* @description 图片内联样式
*/
imageStyle: string;
/**
* @description 距离顶部
*/
top: string;
/**
* @description 距离左边
*/
left: string;
/**
* @description className
*/
className?: string;
}
export interface IGuideTour extends IBaseProps {
/**
* @description 蒙层样式
*/
maskStyle: string;
/**
* @description 蒙层 className
*/
maskClassName?: string;
/**
* @description 步骤详情
*/
items: IStep[];
/**
* @description 当前步骤
*/
current: number;
/**
* @description 初始step
*/
defaultCurrent: number;
/**
* @description 是否开启滑动模式
*/
swiperable: boolean;
/**
* @description 引导是否可见, 受控
* @default true
*/
visible: boolean;
/**
* @description 关闭回调
*/
onCancel: () => void;
/**
* @description 步骤改变回调
*/
onChange: (index: number) => boolean;
/**
* @description 上一步按钮文案
* @default "上一步"
*/
prevStepText?: string;
/**
* @description 下一步按钮文案
* @default "下一步"
*/
nextStepText?: string;
/**
* @description 知道了按钮文案
* @default "知道了"
*/
gotItText?: string;
/**
* @description 跳过按钮文案
* @default "跳过"
*/
jumpText?: string;
}
export const GuideTourDefaultProps: Partial<IGuideTour> = {
visible: false,
swiperable: false,
items: [],
defaultCurrent: 0,
gotItText: '知道了',
nextStepText: '下一步',
prevStepText: '上一步',
jumpText: '跳过'
};
export const GuideTourFunctionalProps: Partial<IGuideTour> = {
maskStyle: '',
maskClassName: '',
items: [],
current: null,
defaultCurrent: 0,
swiperable: false,
visible: false,
};