-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.d.ts
63 lines (59 loc) · 1.46 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
/*
* @FilePath : /index.d.ts
* @Date : 2021-04-22 09:07:33
* @Author : wangjia <[email protected]>
* @Description : type
*/
import { AcceptedPlugin } from "postcss";
declare function PostcssRpxPlugin(
options?: PostcssRpxPlugin.Options | Partial<PostcssRpxPlugin.Options>
): AcceptedPlugin;
declare namespace PostcssRpxPlugin {
interface Options {
/**
* 自定义的单位,触发转换的单位 - 默认`rpx`
*
* 可以自定义的字段,甚至可以设置为`abc`,这样就可以为`abc`的单位触发转换
*
* @default 'rpx'
* @type string
*/
unit: string;
/**
* ui图宽度,除法运算值时的基准宽度 - 默认750
*
* 根据自己的项目设置
*
* @default 750
*/
width: number;
/**
* 单位转换的精度 - 默认5
*
* 除到小数点后的位数
*
* @default 5
* @type number
*/
precision: number; // 折算时结果的精确-默认5,即小数点后5位
/**
* 转换后的单位 - 默认`vw`
*
* 最终在css中单位,也可以自定义配合其他插件使用
*
* @default `vw`
* @type string
*/
outUnit: string;
/**
* 忽略的文件匹配 - 默认为空
*
* 可以设置为数组,如:['a.css', 'b.vue']
*
* @default ""
* @type string | string[]
*/
exclude: string | string[] | RegExp;
}
}
export = PostcssRpxPlugin;