-
Notifications
You must be signed in to change notification settings - Fork 15
/
index.d.ts
63 lines (61 loc) · 1.84 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
/**
* 把 svg 转化成可以用于 <img/> 标签的 src 熟悉的 url 值
*/
export function svg2url(svgString: string): string;
/**
* 生成 barcode
*/
export function barcode(data: string,
type: 'codabar' | 'code11' | 'code39' | 'code93' | 'code128' | 'ean8' | 'ean13' | 'std25' | 'int25',
options?: {
/**
* (number) -height of svg (default: 30);
*/
barHeight?: number;
/**
* (number) -width of svg (default: 100);
*/
width?: number;
/**
* (string) -background color css like (default: 'transparent');
*/
bgColor?: string;
/**
* (string) -barcode color (default: '#000000');
*/
color?: string;
/**
* should show text under bar
*/
showHRI?: boolean;
}): string;
export function qrcode(options: string | {
/**
* QR Code content, required
*/
content: string;
/**
* white space padding, `0` for no border by default
*/
padding?: number;
/**
* QR Code width in pixels
*/
width?: number;
/**
* QR Code height in pixels
*/
height?: number;
/**
* color of modules, color name or hex string, e.g. `#000000`
*/
color?: string;
/**
* color of background, color name or hex string, e.g. `white`
*/
background?: string;
/**
* error correction level: `L`, `M`, `H`, `Q`
*/
ecl?: 'L' | 'M' | 'H' | 'Q';
}): string;