-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy pathindex.d.ts
63 lines (60 loc) · 1.34 KB
/
index.d.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
import React, { ReactNode } from 'react';
export interface IVertifyProp {
/**
* @description canvas宽度
* @default 320
*/
width?: number;
/**
* @description canvas高度
* @default 160
*/
height?: number;
/**
* @description 滑块边长
* @default 42
*/
l?: number;
/**
* @description 滑块半径
* @default 9
*/
r?: number;
/**
* @description 是否可见
* @default true
*/
visible?: boolean;
/**
* @description 滑块文本
* @default 向右滑动填充拼图
*/
text?: string | ReactNode;
/**
* @description 刷新按钮icon, 为icon的url地址
* @default -
*/
refreshIcon?: string;
/**
* @description 用于获取随机图片的url地址
* @default https://picsum.photos/${id}/${width}/${height}, 具体参考https://picsum.photos/, 只需要实现类似接口即可
*/
imgUrl?: string;
/**
* @description 验证成功回调
* @default ():void => {}
*/
onSuccess?: VoidFunction;
/**
* @description 验证失败回调
* @default ():void => {}
*/
onFail?: VoidFunction;
/**
* @description 刷新时回调
* @default ():void => {}
*/
onRefresh?: VoidFunction;
}
declare const Vertify: React.FC<IVertifyProp>;
export { Vertify };