@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.
@@ -1,5 +1,5 @@
1
- export declare const VxetableRender: (VXETable: any, { serviceApi, dict, i18n }: {
2
- serviceApi: any;
3
- dict: any;
4
- i18n: any;
5
- }) => any;
1
+ export declare const VxetableRender: (VXETable: any, { serviceApi, dict, i18n }: {
2
+ serviceApi: any;
3
+ dict: any;
4
+ i18n: any;
5
+ }) => any;
@@ -1,2 +1,2 @@
1
- export declare const addResizeListener: (element: any, fn: () => any) => any;
2
- export declare const removeResizeListener: (element: any, fn: () => any) => any;
1
+ export declare const addResizeListener: (element: any, fn: () => any) => any;
2
+ export declare const removeResizeListener: (element: any, fn: () => any) => any;
@@ -0,0 +1,2 @@
1
+ declare const isPhone: (mobile: any) => boolean;
2
+ export { isPhone };
@@ -1,32 +1,32 @@
1
- interface ProxyStorage {
2
- getItem(key: string): any;
3
- setItem(Key: string, value: string): void;
4
- removeItem(key: string): void;
5
- clear(): void;
6
- }
7
- declare class sessionStorageProxy implements ProxyStorage {
8
- protected storage: ProxyStorage;
9
- constructor(storageModel: ProxyStorage);
10
- prefix: any;
11
- addPrefix: (prefix: any) => void;
12
- setItem(key: string, value: any): void;
13
- getItem(key: string): any;
14
- removeItem(key: string): void;
15
- private getKey;
16
- clear(): void;
17
- }
18
- declare class localStorageProxy extends sessionStorageProxy implements ProxyStorage {
19
- constructor(localStorage: ProxyStorage);
20
- }
21
- declare class localforageProxy implements ProxyStorage {
22
- protected storage: ProxyStorage;
23
- constructor();
24
- setItem(key: string, value: any): void;
25
- getItem(key: string): any;
26
- removeItem(key: string): void;
27
- clear(): void;
28
- }
29
- export declare const storageSession: sessionStorageProxy;
30
- export declare const storageLocal: localStorageProxy;
31
- export declare const dbstorage: localforageProxy;
32
- export {};
1
+ interface ProxyStorage {
2
+ getItem(key: string): any;
3
+ setItem(Key: string, value: string): void;
4
+ removeItem(key: string): void;
5
+ clear(): void;
6
+ }
7
+ declare class sessionStorageProxy implements ProxyStorage {
8
+ protected storage: ProxyStorage;
9
+ constructor(storageModel: ProxyStorage);
10
+ prefix: any;
11
+ addPrefix: (prefix: any) => void;
12
+ setItem(key: string, value: any): void;
13
+ getItem(key: string): any;
14
+ removeItem(key: string): void;
15
+ private getKey;
16
+ clear(): void;
17
+ }
18
+ declare class localStorageProxy extends sessionStorageProxy implements ProxyStorage {
19
+ constructor(localStorage: ProxyStorage);
20
+ }
21
+ declare class localforageProxy implements ProxyStorage {
22
+ protected storage: ProxyStorage;
23
+ constructor();
24
+ setItem(key: string, value: any): void;
25
+ getItem(key: string): any;
26
+ removeItem(key: string): void;
27
+ clear(): void;
28
+ }
29
+ export declare const storageSession: sessionStorageProxy;
30
+ export declare const storageLocal: localStorageProxy;
31
+ export declare const dbstorage: localforageProxy;
32
+ export {};
@@ -1,9 +1,9 @@
1
- import type { Ref } from "vue";
2
- interface Params {
3
- excludeListeners?: boolean;
4
- excludeKeys?: string[];
5
- }
6
- type Recordable<T = any> = Record<string, T>;
7
- export declare function entries<T>(obj: Recordable<T>): [string, T][];
8
- export declare function useAttrs(params?: Params): Ref<Recordable> | {};
9
- export {};
1
+ import type { Ref } from "vue";
2
+ interface Params {
3
+ excludeListeners?: boolean;
4
+ excludeKeys?: string[];
5
+ }
6
+ declare type Recordable<T = any> = Record<string, T>;
7
+ export declare function entries<T>(obj: Recordable<T>): [string, T][];
8
+ export declare function useAttrs(params?: Params): Ref<Recordable> | {};
9
+ export {};
@@ -1,15 +1,15 @@
1
- export declare const useGlobal: () => {
2
- $global: {};
3
- $storage: {};
4
- $config: {};
5
- $serviceApi?: undefined;
6
- $hasAuthority?: undefined;
7
- $printPlugin?: undefined;
8
- } | {
9
- $global: import("vue").ComponentCustomProperties & Record<string, any>;
10
- $storage: any;
11
- $config: any;
12
- $serviceApi: any;
13
- $hasAuthority: any;
14
- $printPlugin: any;
15
- };
1
+ export declare const useGlobal: () => {
2
+ $global: {};
3
+ $storage: {};
4
+ $config: {};
5
+ $serviceApi?: undefined;
6
+ $hasAuthority?: undefined;
7
+ $printPlugin?: undefined;
8
+ } | {
9
+ $global: import("vue").ComponentCustomProperties & Record<string, any>;
10
+ $storage: any;
11
+ $config: any;
12
+ $serviceApi: any;
13
+ $hasAuthority: any;
14
+ $printPlugin: any;
15
+ };
@@ -1,168 +1,168 @@
1
- interface IAttrs {
2
- disabled?: boolean;
3
- defaultValue?: string;
4
- code?: string;
5
- [x: string]: any;
6
- }
7
- import { IRecord } from "../../components/types";
8
- export declare const useRender: () => {
9
- renderDict: (attrs: IAttrs | string, methods?: any) => {
10
- name: string;
11
- optionProps: {
12
- value: string;
13
- label: string;
14
- };
15
- options: any;
16
- props: {
17
- clearable: boolean;
18
- disabled: boolean;
19
- };
20
- defaultValue: any;
21
- events: any;
22
- dictCode: any;
23
- };
24
- renderSelect: (attrs: any, methods?: any) => {
25
- name: string;
26
- optionProps: any;
27
- props: any;
28
- options: any;
29
- events: any;
30
- };
31
- renderInput: (attrs?: any, methods?: any) => {
32
- name: string;
33
- props: any;
34
- defaultValue: any;
35
- events: any;
36
- };
37
- renderTextarea: (attrs?: any, methods?: any) => {
38
- name: string;
39
- props: any;
40
- defaultValue: any;
41
- events: any;
42
- };
43
- renderCheckBox: (attrs: any, methods?: any) => {
44
- name: string;
45
- defaultValue: any;
46
- options: any;
47
- props: {
48
- disabled: boolean;
49
- };
50
- events: any;
51
- };
52
- renderRadio: (attrs: string | IAttrs, methods?: any) => {
53
- name: string;
54
- defaultValue: any;
55
- options: any;
56
- props: {
57
- disabled: boolean;
58
- };
59
- events: any;
60
- };
61
- renderUser: (attr?: any, callback?: any) => {
62
- name: string;
63
- optionProps: any;
64
- props: any;
65
- options: any;
66
- events: any;
67
- };
68
- renderSysUser: (options?: any) => {
69
- name: string;
70
- optionProps: any;
71
- props: any;
72
- options: any;
73
- events: any;
74
- };
75
- renderInvOrg: (attrs?: any, methods?: any) => {
76
- name: string;
77
- props: {
78
- fieldMap: {};
79
- extParam: any;
80
- url: string;
81
- fetchField: string;
82
- };
83
- optionProps: {
84
- label: string;
85
- value: any;
86
- };
87
- options: never[];
88
- methods: any;
89
- };
90
- renderBU: (attrs?: any, methods?: any) => {
91
- name: string;
92
- props: {
93
- fieldMap: {};
94
- extParam: any;
95
- url: string;
96
- fetchField: string;
97
- };
98
- optionProps: {
99
- label: string;
100
- value: any;
101
- };
102
- options: never[];
103
- methods: any;
104
- };
105
- renderNumber: (attrs?: any, methods?: any) => {
106
- name: string;
107
- props: any;
108
- defaultValue: any;
109
- events: any;
110
- };
111
- renderLov: (attrs: any, methods?: any) => {
112
- name: string;
113
- props: any;
114
- events: any;
115
- };
116
- renderSelectLocal: (attrs: any, methods?: any) => {
117
- name: string;
118
- optionProps: any;
119
- options: any;
120
- props: any;
121
- events: any;
122
- };
123
- renderDate: (attrs?: any, methods?: any) => {
124
- name: string;
125
- props: any;
126
- defaultValue: any;
127
- events: any;
128
- };
129
- renderSwitch: (attrs?: string | IAttrs, methods?: any) => {
130
- name: string;
131
- props: {
132
- openLabel: string;
133
- closeLabel: string;
134
- openValue: string;
135
- closeValue: string;
136
- };
137
- defaultValue: string;
138
- events: any;
139
- };
140
- renderCellTag: (code: any, tagMap: any) => {
141
- name: string;
142
- props: {
143
- code: any;
144
- tagMap: any;
145
- };
146
- };
147
- renderEnabled: (options?: any, methods?: any) => {
148
- name: string;
149
- props: {
150
- openLabel: string;
151
- closeLabel: string;
152
- openValue: string;
153
- closeValue: string;
154
- };
155
- defaultValue: string;
156
- events: any;
157
- };
158
- renderIconSelect: () => {
159
- name: string;
160
- };
161
- renderTreeSelect: (sourceData?: IRecord[], props?: {}, events?: any) => {
162
- name: string;
163
- sourceData: IRecord[];
164
- props: {};
165
- events: any;
166
- };
167
- };
168
- export {};
1
+ interface IAttrs {
2
+ disabled?: boolean;
3
+ defaultValue?: string;
4
+ code?: string;
5
+ [x: string]: any;
6
+ }
7
+ import { IRecord } from "../../components/types";
8
+ export declare const useRender: () => {
9
+ renderDict: (attrs: IAttrs | string, methods?: any) => {
10
+ name: string;
11
+ optionProps: {
12
+ value: string;
13
+ label: string;
14
+ };
15
+ options: any;
16
+ props: {
17
+ clearable: boolean;
18
+ disabled: boolean;
19
+ };
20
+ defaultValue: any;
21
+ events: any;
22
+ dictCode: any;
23
+ };
24
+ renderSelect: (attrs: any, methods?: any) => {
25
+ name: string;
26
+ optionProps: any;
27
+ props: any;
28
+ options: any;
29
+ events: any;
30
+ };
31
+ renderInput: (attrs?: any, methods?: any) => {
32
+ name: string;
33
+ props: any;
34
+ defaultValue: any;
35
+ events: any;
36
+ };
37
+ renderTextarea: (attrs?: any, methods?: any) => {
38
+ name: string;
39
+ props: any;
40
+ defaultValue: any;
41
+ events: any;
42
+ };
43
+ renderCheckBox: (attrs: any, methods?: any) => {
44
+ name: string;
45
+ defaultValue: any;
46
+ options: any;
47
+ props: {
48
+ disabled: boolean;
49
+ };
50
+ events: any;
51
+ };
52
+ renderRadio: (attrs: string | IAttrs, methods?: any) => {
53
+ name: string;
54
+ defaultValue: any;
55
+ options: any;
56
+ props: {
57
+ disabled: boolean;
58
+ };
59
+ events: any;
60
+ };
61
+ renderUser: (attr?: any, callback?: any) => {
62
+ name: string;
63
+ optionProps: any;
64
+ props: any;
65
+ options: any;
66
+ events: any;
67
+ };
68
+ renderSysUser: (options?: any) => {
69
+ name: string;
70
+ optionProps: any;
71
+ props: any;
72
+ options: any;
73
+ events: any;
74
+ };
75
+ renderInvOrg: (attrs?: any, methods?: any) => {
76
+ name: string;
77
+ props: {
78
+ fieldMap: {};
79
+ extParam: any;
80
+ url: string;
81
+ fetchField: string;
82
+ };
83
+ optionProps: {
84
+ label: string;
85
+ value: any;
86
+ };
87
+ options: never[];
88
+ methods: any;
89
+ };
90
+ renderBU: (attrs?: any, methods?: any) => {
91
+ name: string;
92
+ props: {
93
+ fieldMap: {};
94
+ extParam: any;
95
+ url: string;
96
+ fetchField: string;
97
+ };
98
+ optionProps: {
99
+ label: string;
100
+ value: any;
101
+ };
102
+ options: never[];
103
+ methods: any;
104
+ };
105
+ renderNumber: (attrs?: any, methods?: any) => {
106
+ name: string;
107
+ props: any;
108
+ defaultValue: any;
109
+ events: any;
110
+ };
111
+ renderLov: (attrs: any, methods?: any) => {
112
+ name: string;
113
+ props: any;
114
+ events: any;
115
+ };
116
+ renderSelectLocal: (attrs: any, methods?: any) => {
117
+ name: string;
118
+ optionProps: any;
119
+ options: any;
120
+ props: any;
121
+ events: any;
122
+ };
123
+ renderDate: (attrs?: any, methods?: any) => {
124
+ name: string;
125
+ props: any;
126
+ defaultValue: any;
127
+ events: any;
128
+ };
129
+ renderSwitch: (attrs?: string | IAttrs, methods?: any) => {
130
+ name: string;
131
+ props: {
132
+ openLabel: string;
133
+ closeLabel: string;
134
+ openValue: string;
135
+ closeValue: string;
136
+ };
137
+ defaultValue: string;
138
+ events: any;
139
+ };
140
+ renderCellTag: (code: any, tagMap: any) => {
141
+ name: string;
142
+ props: {
143
+ code: any;
144
+ tagMap: any;
145
+ };
146
+ };
147
+ renderEnabled: (options?: any, methods?: any) => {
148
+ name: string;
149
+ props: {
150
+ openLabel: string;
151
+ closeLabel: string;
152
+ openValue: string;
153
+ closeValue: string;
154
+ };
155
+ defaultValue: string;
156
+ events: any;
157
+ };
158
+ renderIconSelect: () => {
159
+ name: string;
160
+ };
161
+ renderTreeSelect: (sourceData?: IRecord[], props?: {}, events?: any) => {
162
+ name: string;
163
+ sourceData: IRecord[];
164
+ props: {};
165
+ events: any;
166
+ };
167
+ };
168
+ export {};
@@ -1,24 +1,24 @@
1
- export declare function extractPathList(menuTree: any): any;
2
- /**
3
- * 如果父级下children的length为1,删除children并自动组建唯一uniqueId
4
- * @param {Array} {menuTree 菜单树}
5
- * @param {Array} {pathList 每一项的id组成的数组}
6
- * @param {return}}
7
- */
8
- export declare function deleteTreeChildren(menuTree: any, pathList?: never[]): any[] | undefined;
9
- export declare function buildHierarchyTree(menuTree: any, pathList?: never[]): any[] | undefined;
10
- /**
11
- * 广度优先遍历算法,找当前节点
12
- * @param {Array} tree 原始树,数组
13
- * @param {Number|String} uniqueId 唯一uniqueId
14
- * @return {Object} node
15
- */
16
- export declare function getNodeByUniqueId(menuTree: any, uniqueId: any): any;
17
- /**
18
- * 向当前唯一uniqueId节点追加字段
19
- * @param {Array} {menuTree 菜单树}
20
- * @param {Number|String} uniqueId 唯一uniqueId
21
- * @param {Object} fields 唯一uniqueId
22
- * @return {menuTree} 追加字段后的树
23
- */
24
- export declare function appendFieldByUniqueId(menuTree: Array<any>, uniqueId: Number | String, fields: Object): {} | undefined;
1
+ export declare function extractPathList(menuTree: any): any;
2
+ /**
3
+ * 如果父级下children的length为1,删除children并自动组建唯一uniqueId
4
+ * @param {Array} {menuTree 菜单树}
5
+ * @param {Array} {pathList 每一项的id组成的数组}
6
+ * @param {return}}
7
+ */
8
+ export declare function deleteTreeChildren(menuTree: any, pathList?: never[]): any[] | undefined;
9
+ export declare function buildHierarchyTree(menuTree: any, pathList?: never[]): any[] | undefined;
10
+ /**
11
+ * 广度优先遍历算法,找当前节点
12
+ * @param {Array} tree 原始树,数组
13
+ * @param {Number|String} uniqueId 唯一uniqueId
14
+ * @return {Object} node
15
+ */
16
+ export declare function getNodeByUniqueId(menuTree: any, uniqueId: any): any;
17
+ /**
18
+ * 向当前唯一uniqueId节点追加字段
19
+ * @param {Array} {menuTree 菜单树}
20
+ * @param {Number|String} uniqueId 唯一uniqueId
21
+ * @param {Object} fields 唯一uniqueId
22
+ * @return {menuTree} 追加字段后的树
23
+ */
24
+ export declare function appendFieldByUniqueId(menuTree: Array<any>, uniqueId: Number | String, fields: Object): {} | undefined;
@@ -1,10 +1,10 @@
1
- import { Ref } from "vue";
2
- type attr = {
3
- font?: string;
4
- fillStyle?: string;
5
- };
6
- export declare function useWatermark(appendEl?: Ref<HTMLElement | null>): {
7
- setWatermark: (str: string, attr?: attr | undefined) => void;
8
- clear: () => void;
9
- };
10
- export {};
1
+ import { Ref } from "vue";
2
+ declare type attr = {
3
+ font?: string;
4
+ fillStyle?: string;
5
+ };
6
+ export declare function useWatermark(appendEl?: Ref<HTMLElement | null>): {
7
+ setWatermark: (str: string, attr?: attr | undefined) => void;
8
+ clear: () => void;
9
+ };
10
+ export {};
@@ -1,6 +1,6 @@
1
- /**
2
- * @description: 生成uuid
3
- * @return {*}
4
- */
5
- export declare function buildUUID(): string;
6
- export declare function buildShortUUID(prefix?: string): string;
1
+ /**
2
+ * @description: 生成uuid
3
+ * @return {*}
4
+ */
5
+ export declare function buildUUID(): string;
6
+ export declare function buildShortUUID(prefix?: string): string;