-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.ts
138 lines (128 loc) · 2.7 KB
/
types.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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
import {JSXElementConstructor, ReactElement} from 'react';
import {ImageRequireSource, ImageURISource} from 'react-native';
export type CommonAnimationTypes =
| 'bounce'
| 'flash'
| 'jello'
| 'pulse'
| 'rotate'
| 'rubberBand'
| 'shake'
| 'swing'
| 'tada'
| 'wobble'
| 'bounceIn'
| 'bounceInDown'
| 'bounceInUp'
| 'bounceInLeft'
| 'bounceInRight'
| 'bounceOut'
| 'bounceOutDown'
| 'bounceOutUp'
| 'bounceOutLeft'
| 'bounceOutRight'
| 'fadeIn'
| 'fadeInDown'
| 'fadeInDownBig'
| 'fadeInUp'
| 'fadeInUpBig'
| 'fadeInLeft'
| 'fadeInLeftBig'
| 'fadeInRight'
| 'fadeInRightBig'
| 'fadeOut'
| 'fadeOutDown'
| 'fadeOutDownBig'
| 'fadeOutUp'
| 'fadeOutUpBig'
| 'fadeOutLeft'
| 'fadeOutLeftBig'
| 'fadeOutRight'
| 'fadeOutRightBig'
| 'flipInX'
| 'flipInY'
| 'flipOutX'
| 'flipOutY'
| 'lightSpeedIn'
| 'lightSpeedOut'
| 'slideInDown'
| 'slideInUp'
| 'slideInLeft'
| 'slideInRight'
| 'slideOutDown'
| 'slideOutUp'
| 'slideOutLeft'
| 'slideOutRight'
| 'zoomIn'
| 'zoomInDown'
| 'zoomInUp'
| 'zoomInLeft'
| 'zoomInRight'
| 'zoomOut'
| 'zoomOutDown'
| 'zoomOutUp'
| 'zoomOutLeft'
| 'zoomOutRight';
export type CommonAnimationActions = {
type: CommonAnimationTypes;
duration: number;
delay: number;
};
/** 播放进度,单位: 秒 */
export type ProgressProps = {
/** 当前进度 */
current: number;
/** 已经缓冲的进度 */
cached: number;
/** 视频总长度 */
total: number;
};
/** 进度条配置 */
export type ControllerConfig = {
/** 自动隐藏进度条 */
autoHideController?: boolean;
/** 自动隐藏进度条,单位: 毫秒 */
autoHideTimeout?: number;
/** 已经播放完部分的进度条颜色 */
colorDone?: string;
/** 加载完成部分的进度条颜色 */
colorCached?: string;
/** 整个进度条的颜色 */
colorTotal?: string;
};
/** 加载过程设置 */
export type LoadingConfig = {
cover?: ImageRequireSource | ImageURISource;
view?: ReactElement<any, string | JSXElementConstructor<any>>;
};
/** 加载完成设置 */
export type LoadedConfig = {
cover?: ImageRequireSource | ImageURISource;
};
/** Boss直聘职位 */
export type JobType = {
id: string;
name: string;
children?: JobType[];
};
/** Tabs 属性 */
export type TabType = {
index: number;
name: string;
select: boolean;
};
/** ViewPager */
export type ScrollEvent = {
start: number;
end: number;
finish: boolean;
};
/** Switcher 动画 */
export type SwitcherAnimationConfig = {
/** 附着在弹簧上物体的初始速度 默认: 0 */
velocity?: number;
/** 控制速度 默认: 40 */
tension?: number;
/** 控制弹性 / 过冲 默认: 7 */
friction?: number;
};