@indfnd/utils 0.1.24 → 0.1.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/dist/ind-utils.es.js +20 -4
- package/dist/ind-utils.umd.cjs +13 -13
- package/package.json +1 -1
- package/src/api/com.ts +3 -0
- package/src/api/item.ts +5 -0
- package/src/api/platform/oss.ts +3 -1
- package/src/config/base.config.ts +2 -0
- package/src/config/index.ts +14 -3
- package/types/api/com.d.ts +2 -2
- package/types/api/com.d.ts.map +1 -1
- package/types/api/index-desc.d.ts +2 -2
- package/types/api/index.d.ts +6 -6
- package/types/api/item.d.ts +4 -4
- package/types/api/item.d.ts.map +1 -1
- package/types/api/platform/base64.d.ts +5 -5
- package/types/api/platform/dict.d.ts +4 -4
- package/types/api/platform/index.d.ts +5 -5
- package/types/api/platform/menu.d.ts +17 -11
- package/types/api/platform/oss.d.ts +15 -7
- package/types/api/platform/oss.d.ts.map +1 -1
- package/types/api/platform/user.d.ts +17 -12
- package/types/api/user.d.ts +2 -2
- package/types/config/base.config.d.ts +33 -32
- package/types/config/base.config.d.ts.map +1 -1
- package/types/config/dev.config.d.ts +3 -3
- package/types/config/index.d.ts +6 -65
- package/types/config/index.d.ts.map +1 -1
- package/types/config/prod.config.d.ts +3 -3
- package/types/index.d.ts +4 -4
- package/types/utils/base64.d.ts +22 -22
- package/types/utils/blob.d.ts +3 -3
- package/types/utils/cache/dict-cache.d.ts +3 -3
- package/types/utils/cache/index-desc.d.ts +4 -4
- package/types/utils/cache/index.d.ts +4 -4
- package/types/utils/cache/permission-cache.d.ts +4 -4
- package/types/utils/cache/user-cache.d.ts +4 -4
- package/types/utils/date.d.ts +4 -4
- package/types/utils/enum.d.ts +43 -39
- package/types/utils/event.d.ts +13 -5
- package/types/utils/excel.d.ts +4 -4
- package/types/utils/half-year.d.ts +6 -6
- package/types/utils/index.d.ts +20 -20
- package/types/utils/is-type.d.ts +33 -33
- package/types/utils/mime-type.d.ts +67 -67
- package/types/utils/number.d.ts +8 -8
- package/types/utils/quarter.d.ts +7 -7
- package/types/utils/request/axios.extends.d.ts +7 -3
- package/types/utils/request/cache-rules.d.ts +3 -3
- package/types/utils/request/content-type.d.ts +9 -9
- package/types/utils/request/index.d.ts +8 -8
- package/types/utils/request/interceptors.d.ts +4 -4
- package/types/utils/request/url-params.d.ts +6 -6
- package/types/utils/sm3/index.d.ts +6 -6
- package/types/utils/sm3/sm3.d.ts +3 -3
- package/types/utils/storage.d.ts +8 -8
- package/types/utils/table.d.ts +40 -31
- package/types/utils/token.d.ts +3 -3
- package/types/utils/uuid.d.ts +4 -4
- package/types/utils/validate.d.ts +5 -5
package/types/utils/table.d.ts
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
interface ColumnGroup {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
2
|
+
key?: string
|
|
3
|
+
title?: string
|
|
4
|
+
keyProp?: string
|
|
5
|
+
titleProp?: string
|
|
6
|
+
titleFormatter?: (title: string) => string
|
|
7
|
+
sortProp?: string
|
|
8
|
+
sortOrder?: boolean | 'asc' | 'desc'
|
|
9
|
+
keyLastSuffix?: string
|
|
10
|
+
isLimitChildren?: boolean
|
|
11
|
+
headerTooltip?: boolean | string | ((data: any, parents: Array<any>) => string)
|
|
12
|
+
children?: ColumnGroup[]
|
|
13
|
+
[propName: string]: any
|
|
14
14
|
}
|
|
15
15
|
interface row2columnOption {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
keyPropName?: string
|
|
17
|
+
titlePropName?: string
|
|
18
|
+
sumColumnDefs?: Array<{
|
|
19
|
+
key: string
|
|
20
|
+
title: string
|
|
21
|
+
[propName: string]: any
|
|
22
|
+
}>
|
|
23
|
+
sumColKeyProp?: 'sumColCode'
|
|
24
|
+
sumColTitleProp?: 'sumColName'
|
|
25
25
|
}
|
|
26
26
|
interface Column {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
key?: string
|
|
28
|
+
title?: string
|
|
29
|
+
children?: Column[]
|
|
30
|
+
[propName: string]: any
|
|
31
31
|
}
|
|
32
32
|
interface row2columnResult {
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
columns: Column[]
|
|
34
|
+
data: Array<any>
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
37
|
* 行转列公共方法
|
|
@@ -43,7 +43,12 @@ interface row2columnResult {
|
|
|
43
43
|
* @param option 一些参数
|
|
44
44
|
* @returns 行转列后的表头和数据
|
|
45
45
|
*/
|
|
46
|
-
export declare function row2column(
|
|
46
|
+
export declare function row2column(
|
|
47
|
+
data: Array<any>,
|
|
48
|
+
columnGroups: ColumnGroup[],
|
|
49
|
+
rowKey: string | string[],
|
|
50
|
+
option?: row2columnOption,
|
|
51
|
+
): row2columnResult
|
|
47
52
|
/**
|
|
48
53
|
* 从行转列的数据转回行数据
|
|
49
54
|
*
|
|
@@ -52,6 +57,10 @@ export declare function row2column(data: Array<any>, columnGroups: ColumnGroup[]
|
|
|
52
57
|
* @param option 一些参数
|
|
53
58
|
* @returns 行数据
|
|
54
59
|
*/
|
|
55
|
-
export declare function flattenRow2ColumnData(
|
|
56
|
-
|
|
57
|
-
|
|
60
|
+
export declare function flattenRow2ColumnData(
|
|
61
|
+
data?: Array<any>,
|
|
62
|
+
columns?: Column[],
|
|
63
|
+
option?: row2columnOption,
|
|
64
|
+
): Array<any>
|
|
65
|
+
export {}
|
|
66
|
+
//# sourceMappingURL=table.d.ts.map
|
package/types/utils/token.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare function setToken(token: string): void
|
|
2
|
-
export declare function getToken(): string | boolean
|
|
3
|
-
//# sourceMappingURL=token.d.ts.map
|
|
1
|
+
export declare function setToken(token: string): void
|
|
2
|
+
export declare function getToken(): string | boolean
|
|
3
|
+
//# sourceMappingURL=token.d.ts.map
|
package/types/utils/uuid.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
declare const uuid: (size?: number) => string
|
|
2
|
-
export { uuid }
|
|
1
|
+
declare const uuid: (size?: number) => string
|
|
2
|
+
export { uuid }
|
|
3
3
|
/**
|
|
4
4
|
* 生成uid
|
|
5
5
|
*/
|
|
6
|
-
export declare function guid(): string
|
|
7
|
-
//# sourceMappingURL=uuid.d.ts.map
|
|
6
|
+
export declare function guid(): string
|
|
7
|
+
//# sourceMappingURL=uuid.d.ts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export declare function checkIdCard(idcard: string): string
|
|
2
|
-
export declare function checkPhone(str: string): boolean
|
|
1
|
+
export declare function checkIdCard(idcard: string): string
|
|
2
|
+
export declare function checkPhone(str: string): boolean
|
|
3
3
|
/**
|
|
4
4
|
* 校验电话号码是否正确
|
|
5
5
|
*
|
|
6
6
|
*/
|
|
7
|
-
export declare function checkTel(val: any): boolean
|
|
8
|
-
export declare function checkVehicleNo(str: string): boolean
|
|
9
|
-
//# sourceMappingURL=validate.d.ts.map
|
|
7
|
+
export declare function checkTel(val: any): boolean
|
|
8
|
+
export declare function checkVehicleNo(str: string): boolean
|
|
9
|
+
//# sourceMappingURL=validate.d.ts.map
|