@utogether/utils 2.8.1 → 2.8.5
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/dist/pkg/cookie.d.ts +31 -31
- package/dist/pkg/device.d.ts +7 -7
- package/dist/pkg/element.d.ts +9 -9
- package/dist/pkg/encrypte.d.ts +12 -0
- package/dist/pkg/format.d.ts +53 -53
- package/dist/pkg/formatData.d.ts +43 -26
- package/dist/pkg/http/index.d.ts +31 -31
- package/dist/pkg/lunarCalendar.d.ts +426 -426
- package/dist/pkg/message.d.ts +31 -31
- package/dist/pkg/progress.d.ts +2 -2
- package/dist/pkg/remixiconSet.d.ts +7623 -7623
- package/dist/pkg/render.d.ts +5 -5
- package/dist/pkg/resize.d.ts +2 -2
- package/dist/pkg/rules.d.ts +2 -0
- package/dist/pkg/storage.d.ts +32 -32
- package/dist/pkg/useAttrs.d.ts +9 -9
- package/dist/pkg/useGlobal.d.ts +15 -15
- package/dist/pkg/useRender.d.ts +168 -168
- package/dist/pkg/useTree.d.ts +24 -24
- package/dist/pkg/useWatermark.d.ts +10 -10
- package/dist/pkg/uuid.d.ts +6 -6
- package/dist/utils.es.js +13577 -0
- package/dist/utils.umd.js +7 -5
- package/package.json +27 -26
- package/dist/index.d.ts +0 -56
package/dist/pkg/cookie.d.ts
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
declare class Cookies {
|
|
2
|
-
constructor();
|
|
3
|
-
prefix: null;
|
|
4
|
-
/**
|
|
5
|
-
* 存储 cookie 值
|
|
6
|
-
* @param name
|
|
7
|
-
* @param value
|
|
8
|
-
* @param cookieSetting
|
|
9
|
-
*/
|
|
10
|
-
set(name?: string, value?: string): void;
|
|
11
|
-
/**
|
|
12
|
-
* 拿到 cookie 值
|
|
13
|
-
* @param name
|
|
14
|
-
* @returns
|
|
15
|
-
*/
|
|
16
|
-
get(name?: string): string | undefined;
|
|
17
|
-
/**
|
|
18
|
-
* 拿到 cookie 全部的值
|
|
19
|
-
* @returns
|
|
20
|
-
*/
|
|
21
|
-
getAll(): string | undefined;
|
|
22
|
-
/**
|
|
23
|
-
* 删除 cookie
|
|
24
|
-
* @param name
|
|
25
|
-
*/
|
|
26
|
-
remove(name?: string): void;
|
|
27
|
-
private getKey;
|
|
28
|
-
addPrefix: (prefix: any) => void;
|
|
29
|
-
}
|
|
30
|
-
export declare const cookies: Cookies;
|
|
31
|
-
export {};
|
|
1
|
+
declare class Cookies {
|
|
2
|
+
constructor();
|
|
3
|
+
prefix: null;
|
|
4
|
+
/**
|
|
5
|
+
* 存储 cookie 值
|
|
6
|
+
* @param name
|
|
7
|
+
* @param value
|
|
8
|
+
* @param cookieSetting
|
|
9
|
+
*/
|
|
10
|
+
set(name?: string, value?: string): void;
|
|
11
|
+
/**
|
|
12
|
+
* 拿到 cookie 值
|
|
13
|
+
* @param name
|
|
14
|
+
* @returns
|
|
15
|
+
*/
|
|
16
|
+
get(name?: string): string | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* 拿到 cookie 全部的值
|
|
19
|
+
* @returns
|
|
20
|
+
*/
|
|
21
|
+
getAll(): string | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* 删除 cookie
|
|
24
|
+
* @param name
|
|
25
|
+
*/
|
|
26
|
+
remove(name?: string): void;
|
|
27
|
+
private getKey;
|
|
28
|
+
addPrefix: (prefix: any) => void;
|
|
29
|
+
}
|
|
30
|
+
export declare const cookies: Cookies;
|
|
31
|
+
export {};
|
package/dist/pkg/device.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
interface BrowserInter {
|
|
2
|
-
browser: string;
|
|
3
|
-
version: string;
|
|
4
|
-
}
|
|
5
|
-
export declare const deviceDetection: () => boolean;
|
|
6
|
-
export declare const getBrowserInfo: () => BrowserInter;
|
|
7
|
-
export {};
|
|
1
|
+
interface BrowserInter {
|
|
2
|
+
browser: string;
|
|
3
|
+
version: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const deviceDetection: () => boolean;
|
|
6
|
+
export declare const getBrowserInfo: () => BrowserInter;
|
|
7
|
+
export {};
|
package/dist/pkg/element.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
declare type FunctionArgs<Args extends any[] = any[], Return = void> = (...args: Args) => Return;
|
|
2
|
-
declare type RefType<T> = T | null;
|
|
3
|
-
export declare const hasClass: (ele: RefType<any>, cls: string) => any;
|
|
4
|
-
export declare const addClass: (ele: RefType<any>, cls: string, extracls?: string) => any;
|
|
5
|
-
export declare const removeClass: (ele: RefType<any>, cls: string, extracls?: string) => any;
|
|
6
|
-
export declare const toggleClass: (flag: boolean, clsName: string, target?: RefType<any>) => any;
|
|
7
|
-
export declare function useRafThrottle<T extends FunctionArgs>(fn: T): T;
|
|
8
|
-
export declare const openLink: <T>(link: T) => void;
|
|
9
|
-
export {};
|
|
1
|
+
declare type FunctionArgs<Args extends any[] = any[], Return = void> = (...args: Args) => Return;
|
|
2
|
+
declare type RefType<T> = T | null;
|
|
3
|
+
export declare const hasClass: (ele: RefType<any>, cls: string) => any;
|
|
4
|
+
export declare const addClass: (ele: RefType<any>, cls: string, extracls?: string) => any;
|
|
5
|
+
export declare const removeClass: (ele: RefType<any>, cls: string, extracls?: string) => any;
|
|
6
|
+
export declare const toggleClass: (flag: boolean, clsName: string, target?: RefType<any>) => any;
|
|
7
|
+
export declare function useRafThrottle<T extends FunctionArgs>(fn: T): T;
|
|
8
|
+
export declare const openLink: <T>(link: T) => void;
|
|
9
|
+
export {};
|
package/dist/pkg/format.d.ts
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
export declare const formats: {
|
|
2
|
-
formatDate: {
|
|
3
|
-
cellFormatMethod({ cellValue }: {
|
|
4
|
-
cellValue: any;
|
|
5
|
-
}, format: any): any;
|
|
6
|
-
};
|
|
7
|
-
formatAmount: {
|
|
8
|
-
cellFormatMethod({ cellValue }: {
|
|
9
|
-
cellValue: any;
|
|
10
|
-
}, digits?: number): string;
|
|
11
|
-
};
|
|
12
|
-
formatBankcard: {
|
|
13
|
-
cellFormatMethod({ cellValue }: {
|
|
14
|
-
cellValue: any;
|
|
15
|
-
}): string;
|
|
16
|
-
};
|
|
17
|
-
formatFixedNumber: {
|
|
18
|
-
cellFormatMethod({ cellValue }: {
|
|
19
|
-
cellValue: any;
|
|
20
|
-
}, digits?: number): any;
|
|
21
|
-
};
|
|
22
|
-
formatCutNumber: {
|
|
23
|
-
cellFormatMethod({ cellValue }: {
|
|
24
|
-
cellValue: any;
|
|
25
|
-
}, digits?: number): any;
|
|
26
|
-
};
|
|
27
|
-
formatDict: {
|
|
28
|
-
cellFormatMethod({ cellValue }: {
|
|
29
|
-
cellValue: any;
|
|
30
|
-
}, dictCode: any): any;
|
|
31
|
-
};
|
|
32
|
-
formatRelateField: {
|
|
33
|
-
cellFormatMethod({ row, cellValue }: {
|
|
34
|
-
row: any;
|
|
35
|
-
cellValue: any;
|
|
36
|
-
}, field: any): any;
|
|
37
|
-
};
|
|
38
|
-
formatContact: {
|
|
39
|
-
cellFormatMethod({ row }: {
|
|
40
|
-
row: any;
|
|
41
|
-
}, fields: any): any;
|
|
42
|
-
};
|
|
43
|
-
formatSelectLocal: {
|
|
44
|
-
cellFormatMethod({ cellValue }: {
|
|
45
|
-
cellValue: any;
|
|
46
|
-
}, localOptions: any): any;
|
|
47
|
-
};
|
|
48
|
-
formatMultiValue: {
|
|
49
|
-
cellFormatMethod({ row }: {
|
|
50
|
-
row: any;
|
|
51
|
-
}, multiOptions: any): any;
|
|
52
|
-
};
|
|
53
|
-
};
|
|
1
|
+
export declare const formats: {
|
|
2
|
+
formatDate: {
|
|
3
|
+
cellFormatMethod({ cellValue }: {
|
|
4
|
+
cellValue: any;
|
|
5
|
+
}, format: any): any;
|
|
6
|
+
};
|
|
7
|
+
formatAmount: {
|
|
8
|
+
cellFormatMethod({ cellValue }: {
|
|
9
|
+
cellValue: any;
|
|
10
|
+
}, digits?: number): string;
|
|
11
|
+
};
|
|
12
|
+
formatBankcard: {
|
|
13
|
+
cellFormatMethod({ cellValue }: {
|
|
14
|
+
cellValue: any;
|
|
15
|
+
}): string;
|
|
16
|
+
};
|
|
17
|
+
formatFixedNumber: {
|
|
18
|
+
cellFormatMethod({ cellValue }: {
|
|
19
|
+
cellValue: any;
|
|
20
|
+
}, digits?: number): any;
|
|
21
|
+
};
|
|
22
|
+
formatCutNumber: {
|
|
23
|
+
cellFormatMethod({ cellValue }: {
|
|
24
|
+
cellValue: any;
|
|
25
|
+
}, digits?: number): any;
|
|
26
|
+
};
|
|
27
|
+
formatDict: {
|
|
28
|
+
cellFormatMethod({ cellValue }: {
|
|
29
|
+
cellValue: any;
|
|
30
|
+
}, dictCode: any): any;
|
|
31
|
+
};
|
|
32
|
+
formatRelateField: {
|
|
33
|
+
cellFormatMethod({ row, cellValue }: {
|
|
34
|
+
row: any;
|
|
35
|
+
cellValue: any;
|
|
36
|
+
}, field: any): any;
|
|
37
|
+
};
|
|
38
|
+
formatContact: {
|
|
39
|
+
cellFormatMethod({ row }: {
|
|
40
|
+
row: any;
|
|
41
|
+
}, fields: any): any;
|
|
42
|
+
};
|
|
43
|
+
formatSelectLocal: {
|
|
44
|
+
cellFormatMethod({ cellValue }: {
|
|
45
|
+
cellValue: any;
|
|
46
|
+
}, localOptions: any): any;
|
|
47
|
+
};
|
|
48
|
+
formatMultiValue: {
|
|
49
|
+
cellFormatMethod({ row }: {
|
|
50
|
+
row: any;
|
|
51
|
+
}, multiOptions: any): any;
|
|
52
|
+
};
|
|
53
|
+
};
|
package/dist/pkg/formatData.d.ts
CHANGED
|
@@ -1,26 +1,43 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description: col数据国际化
|
|
3
|
-
* @param {*} columns col
|
|
4
|
-
* @return {*} 标准化后的col
|
|
5
|
-
*/
|
|
6
|
-
export declare const i18nColums: (columns: any) => any;
|
|
7
|
-
/**
|
|
8
|
-
* @description: form item数据标准化
|
|
9
|
-
* @param {*} items item
|
|
10
|
-
* @param {*} status 状态
|
|
11
|
-
* @return {*} form item数据标准化后的数据
|
|
12
|
-
*/
|
|
13
|
-
export declare const formatItems: (items: any, status: any, span?: number) => any;
|
|
14
|
-
/**
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @description: col数据国际化
|
|
3
|
+
* @param {*} columns col
|
|
4
|
+
* @return {*} 标准化后的col
|
|
5
|
+
*/
|
|
6
|
+
export declare const i18nColums: (columns: any) => any;
|
|
7
|
+
/**
|
|
8
|
+
* @description: form item数据标准化
|
|
9
|
+
* @param {*} items item
|
|
10
|
+
* @param {*} status 状态
|
|
11
|
+
* @return {*} form item数据标准化后的数据
|
|
12
|
+
*/
|
|
13
|
+
export declare const formatItems: (items: any, status: any, span?: number) => any;
|
|
14
|
+
/** 表单form查询按钮组 */
|
|
15
|
+
export declare const formSearchButtons: {
|
|
16
|
+
span: number;
|
|
17
|
+
align: string;
|
|
18
|
+
collapseNode: boolean;
|
|
19
|
+
itemRender: {
|
|
20
|
+
name: string;
|
|
21
|
+
children: {
|
|
22
|
+
props: {
|
|
23
|
+
type: string;
|
|
24
|
+
content: string;
|
|
25
|
+
status: string;
|
|
26
|
+
icon: string;
|
|
27
|
+
};
|
|
28
|
+
}[];
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* @description: grid 查询item格式化
|
|
33
|
+
* @param {*} array items
|
|
34
|
+
* @return {*} items
|
|
35
|
+
*/
|
|
36
|
+
export declare const formatGridItems: (array: any, favorite: any) => any;
|
|
37
|
+
/**
|
|
38
|
+
* @description: 标准化必填数据
|
|
39
|
+
* @param {*} records 数据列表
|
|
40
|
+
* @param {*} t i18n对象
|
|
41
|
+
* @return {*} rule数据
|
|
42
|
+
*/
|
|
43
|
+
export declare const formatRules: (records: any, t: any) => {};
|
package/dist/pkg/http/index.d.ts
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { AxiosRequestConfig } from "axios";
|
|
2
|
-
import { RequestMethods, SuHttpRequestConfig } from "./types.d";
|
|
3
|
-
declare class SuHttp {
|
|
4
|
-
constructor();
|
|
5
|
-
router: undefined;
|
|
6
|
-
baseUrl: null;
|
|
7
|
-
/** token过期后,暂存待执行的请求 */
|
|
8
|
-
private static requests;
|
|
9
|
-
/** 防止重复刷新token */
|
|
10
|
-
private static isRefreshing;
|
|
11
|
-
/** 设置router调整 */
|
|
12
|
-
setRouter(router: any): void;
|
|
13
|
-
setBaseUrl(baseUrl: any): void;
|
|
14
|
-
private static initConfig;
|
|
15
|
-
private static axiosInstance;
|
|
16
|
-
/** 重连原始请求 */
|
|
17
|
-
private static retryOriginalRequest;
|
|
18
|
-
private httpInterceptorsRequest;
|
|
19
|
-
private setToken;
|
|
20
|
-
private httpInterceptorsResponse;
|
|
21
|
-
private transformConfigByMethod;
|
|
22
|
-
request<T>(method: RequestMethods, url: string, param?: AxiosRequestConfig, axiosConfig?: SuHttpRequestConfig): Promise<T>;
|
|
23
|
-
getNetworkError: (code: any) => any;
|
|
24
|
-
post<T, P>(url: string, params?: T, config?: SuHttpRequestConfig): Promise<P>;
|
|
25
|
-
delete<T, P>(url: string, params?: T, config?: SuHttpRequestConfig): Promise<P>;
|
|
26
|
-
put<T, P>(url: string, params?: T, config?: SuHttpRequestConfig): Promise<P>;
|
|
27
|
-
get<T, P>(url: string, params?: T, config?: SuHttpRequestConfig): Promise<P>;
|
|
28
|
-
postRouter<T>(params?: any): Promise<T>;
|
|
29
|
-
}
|
|
30
|
-
export declare const http: SuHttp;
|
|
31
|
-
export {};
|
|
1
|
+
import { AxiosRequestConfig } from "axios";
|
|
2
|
+
import { RequestMethods, SuHttpRequestConfig } from "./types.d";
|
|
3
|
+
declare class SuHttp {
|
|
4
|
+
constructor();
|
|
5
|
+
router: undefined;
|
|
6
|
+
baseUrl: null;
|
|
7
|
+
/** token过期后,暂存待执行的请求 */
|
|
8
|
+
private static requests;
|
|
9
|
+
/** 防止重复刷新token */
|
|
10
|
+
private static isRefreshing;
|
|
11
|
+
/** 设置router调整 */
|
|
12
|
+
setRouter(router: any): void;
|
|
13
|
+
setBaseUrl(baseUrl: any): void;
|
|
14
|
+
private static initConfig;
|
|
15
|
+
private static axiosInstance;
|
|
16
|
+
/** 重连原始请求 */
|
|
17
|
+
private static retryOriginalRequest;
|
|
18
|
+
private httpInterceptorsRequest;
|
|
19
|
+
private setToken;
|
|
20
|
+
private httpInterceptorsResponse;
|
|
21
|
+
private transformConfigByMethod;
|
|
22
|
+
request<T>(method: RequestMethods, url: string, param?: AxiosRequestConfig, axiosConfig?: SuHttpRequestConfig): Promise<T>;
|
|
23
|
+
getNetworkError: (code: any) => any;
|
|
24
|
+
post<T, P>(url: string, params?: T, config?: SuHttpRequestConfig): Promise<P>;
|
|
25
|
+
delete<T, P>(url: string, params?: T, config?: SuHttpRequestConfig): Promise<P>;
|
|
26
|
+
put<T, P>(url: string, params?: T, config?: SuHttpRequestConfig): Promise<P>;
|
|
27
|
+
get<T, P>(url: string, params?: T, config?: SuHttpRequestConfig): Promise<P>;
|
|
28
|
+
postRouter<T>(params?: any): Promise<T>;
|
|
29
|
+
}
|
|
30
|
+
export declare const http: SuHttp;
|
|
31
|
+
export {};
|