@indfnd/utils 0.1.26 → 0.1.28

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.
Files changed (64) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/ind-utils.es.js +388 -365
  3. package/dist/ind-utils.umd.cjs +20 -20
  4. package/package.json +2 -2
  5. package/src/utils/request/axios.extends.ts +14 -0
  6. package/src/utils/request/index.ts +116 -0
  7. package/src/utils/request/interceptors.ts +2 -1
  8. package/types/api/com.d.ts +3 -1
  9. package/types/api/com.d.ts.map +1 -1
  10. package/types/api/index-desc.d.ts +3 -1
  11. package/types/api/index-desc.d.ts.map +1 -1
  12. package/types/api/index.d.ts +6 -6
  13. package/types/api/item.d.ts +5 -3
  14. package/types/api/item.d.ts.map +1 -1
  15. package/types/api/platform/base64.d.ts +5 -5
  16. package/types/api/platform/dict.d.ts +3 -1
  17. package/types/api/platform/dict.d.ts.map +1 -1
  18. package/types/api/platform/index.d.ts +5 -5
  19. package/types/api/platform/menu.d.ts +14 -10
  20. package/types/api/platform/menu.d.ts.map +1 -1
  21. package/types/api/platform/oss.d.ts +2 -2
  22. package/types/api/platform/oss.d.ts.map +1 -1
  23. package/types/api/platform/user.d.ts +7 -5
  24. package/types/api/platform/user.d.ts.map +1 -1
  25. package/types/api/user.d.ts +3 -1
  26. package/types/api/user.d.ts.map +1 -1
  27. package/types/config/base.config.d.ts +33 -33
  28. package/types/config/dev.config.d.ts +3 -3
  29. package/types/config/index.d.ts +6 -6
  30. package/types/config/prod.config.d.ts +3 -3
  31. package/types/index.d.ts +4 -4
  32. package/types/utils/base64.d.ts +22 -22
  33. package/types/utils/blob.d.ts +3 -3
  34. package/types/utils/cache/dict-cache.d.ts +3 -3
  35. package/types/utils/cache/index-desc.d.ts +4 -4
  36. package/types/utils/cache/index.d.ts +4 -4
  37. package/types/utils/cache/permission-cache.d.ts +4 -4
  38. package/types/utils/cache/user-cache.d.ts +4 -4
  39. package/types/utils/date.d.ts +4 -4
  40. package/types/utils/enum.d.ts +39 -43
  41. package/types/utils/event.d.ts +5 -13
  42. package/types/utils/excel.d.ts +4 -4
  43. package/types/utils/half-year.d.ts +6 -6
  44. package/types/utils/index.d.ts +20 -20
  45. package/types/utils/is-type.d.ts +33 -33
  46. package/types/utils/mime-type.d.ts +67 -67
  47. package/types/utils/number.d.ts +8 -8
  48. package/types/utils/quarter.d.ts +7 -7
  49. package/types/utils/request/axios.extends.d.ts +6 -7
  50. package/types/utils/request/axios.extends.d.ts.map +1 -1
  51. package/types/utils/request/cache-rules.d.ts +3 -3
  52. package/types/utils/request/content-type.d.ts +9 -9
  53. package/types/utils/request/index.d.ts +20 -8
  54. package/types/utils/request/index.d.ts.map +1 -1
  55. package/types/utils/request/interceptors.d.ts +4 -4
  56. package/types/utils/request/interceptors.d.ts.map +1 -1
  57. package/types/utils/request/url-params.d.ts +6 -6
  58. package/types/utils/sm3/index.d.ts +6 -6
  59. package/types/utils/sm3/sm3.d.ts +3 -3
  60. package/types/utils/storage.d.ts +8 -8
  61. package/types/utils/table.d.ts +31 -40
  62. package/types/utils/token.d.ts +3 -3
  63. package/types/utils/uuid.d.ts +4 -4
  64. package/types/utils/validate.d.ts +5 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indfnd/utils",
3
- "version": "0.1.26",
3
+ "version": "0.1.28",
4
4
  "author": "huxuetong",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -34,7 +34,7 @@
34
34
  "re-publish": "yarn publish --access public"
35
35
  },
36
36
  "dependencies": {
37
- "axios": "^0.21.4",
37
+ "axios": "^0.24.0",
38
38
  "dayjs": "^1.11.9",
39
39
  "lodash": "^4.17.21",
40
40
  "md5": "^2.3.0",
@@ -6,4 +6,18 @@ export interface AxiosExtendsInstance extends AxiosInstance {
6
6
  data: any,
7
7
  config?: AxiosRequestConfig,
8
8
  ): Promise<R>
9
+
10
+ getSingleton?<T = any, R = AxiosResponse<T>>(url: string, config?: AxiosRequestConfig): Promise<R>
11
+
12
+ postSingleton?<T = any, R = AxiosResponse<T>>(
13
+ url: string,
14
+ data: any,
15
+ config?: AxiosRequestConfig,
16
+ ): Promise<R>
17
+
18
+ formPostSingleton?<T = any, R = AxiosResponse<T>>(
19
+ url: string,
20
+ data: any,
21
+ config?: AxiosRequestConfig,
22
+ ): Promise<R>
9
23
  }
@@ -16,5 +16,121 @@ instance.formPost = function (url, data, config) {
16
16
  setContentType(headers, CONTENT_TYPE.form)
17
17
  return instance.post(url, data, { ...config, headers })
18
18
  }
19
+ /**
20
+ * 对业务封装的axios service Api进行封装,封装以后的Api同一时间只有一个网络请求
21
+ * 即上一次发起的网络请求将调用浏览器取消网络请求
22
+ * 注意:如果serviceApi是多个组件共同使用时,需要慎重使用本方法,避免导致由于请求被取消导致的功能异常
23
+ * @param {Function} api - 需要封装的API函数
24
+ * @returns {Function} 封装后可取消的api
25
+ */
26
+ export const wrapApi = (api) => {
27
+ // 每个函数都有自己的 controller,避免互相干扰
28
+ let currentController = null
29
+
30
+ const wrappedFunction = async function (...args) {
31
+ // 取消之前的请求
32
+ if (currentController) {
33
+ console.log('currentController.abort trigger, now cancel before request')
34
+ currentController.abort()
35
+ currentController = null
36
+ }
37
+
38
+ // 创建新的 AbortController
39
+ const controller = new AbortController()
40
+ currentController = controller
41
+
42
+ // 准备参数
43
+ const newArgs = [...args]
44
+ const lastIndex = newArgs.length - 1
45
+
46
+ try {
47
+ // 处理配置参数
48
+ if (
49
+ newArgs.length > 0 &&
50
+ typeof newArgs[lastIndex] === 'object' &&
51
+ !Array.isArray(newArgs[lastIndex])
52
+ ) {
53
+ // 最后一个参数是配置对象
54
+ const config = newArgs[lastIndex]
55
+
56
+ // 如果有原生的 signal,需要合并处理
57
+ if (config.signal) {
58
+ // 创建一个新的 AbortController 来合并多个 signal
59
+ const combinedController = new AbortController()
60
+ const originalSignal = config.signal
61
+
62
+ // 监听原始 signal 的取消
63
+ originalSignal.addEventListener('abort', () => {
64
+ combinedController.abort(originalSignal.reason)
65
+ })
66
+
67
+ // 监听当前 controller 的取消
68
+ controller.signal.addEventListener('abort', () => {
69
+ combinedController.abort(controller.signal.reason)
70
+ })
71
+
72
+ // 使用合并后的 signal
73
+ newArgs[lastIndex] = {
74
+ ...config,
75
+ signal: combinedController.signal,
76
+ }
77
+ } else {
78
+ // 直接使用新的 signal
79
+ newArgs[lastIndex] = {
80
+ ...config,
81
+ signal: controller.signal,
82
+ }
83
+ }
84
+ } else {
85
+ // 没有配置对象,添加一个
86
+ newArgs.push({ signal: controller.signal })
87
+ }
88
+
89
+ // 执行请求
90
+ const result = await api(...newArgs)
91
+
92
+ // 请求成功后清理 controller
93
+ currentController = null
94
+ return result
95
+ } catch (error) {
96
+ // 如果是取消错误,重新抛出
97
+ if (error.name === 'AbortError' || axios.isCancel(error)) {
98
+ throw Object.assign(new Error('Request cancelled'), {
99
+ name: 'AbortError',
100
+ cancelled: true,
101
+ originalError: error,
102
+ })
103
+ }
104
+
105
+ // 其他错误正常抛出
106
+ throw error
107
+ } finally {
108
+ // 如果当前 controller 仍然是这个请求的,清理它
109
+ if (currentController === controller) {
110
+ currentController = null
111
+ }
112
+ }
113
+ }
114
+
115
+ // 添加取消方法,允许外部取消
116
+ wrappedFunction.cancel = (reason) => {
117
+ if (currentController) {
118
+ currentController.abort(reason)
119
+ currentController = null
120
+ }
121
+ }
122
+
123
+ // 添加检查是否正在请求的方法
124
+ wrappedFunction.isPending = () => {
125
+ return currentController !== null
126
+ }
127
+
128
+ return wrappedFunction
129
+ }
130
+
131
+ // 对axios进行封装,返回单例模式的Api
132
+ instance.getSingleton = wrapApi(instance.get)
133
+ instance.postSingleton = wrapApi(instance.post)
134
+ instance.formPostSingleton = wrapApi(instance.formPost)
19
135
 
20
136
  export { instance as axios }
@@ -9,6 +9,7 @@ const SUCCESS_CODE = 1
9
9
  const NO_SESSION_CODE = 10106
10
10
 
11
11
  let timer: any = null
12
+
12
13
  function _debounce(callback: Function) {
13
14
  if (timer) {
14
15
  clearTimeout(timer)
@@ -103,7 +104,7 @@ export function inspectorError(error) {
103
104
  if (error?.code === 'ECONNABORTED') {
104
105
  // 超时
105
106
  window.apiErrorHandler && window.apiErrorHandler('请求超时,请稍后再试')
106
- } else if (error?.response?.status !== 200) {
107
+ } else if (error?.response?.status !== 200 && error?.message !== 'canceled') {
107
108
  window.apiErrorHandler && window.apiErrorHandler('请求出错了')
108
109
  }
109
110
  return Promise.reject(error)
@@ -1,2 +1,4 @@
1
- export declare function listComTreeApi(params: any): Promise<import('axios').AxiosResponse<any>>
1
+ export declare function listComTreeApi(
2
+ params: any,
3
+ ): Promise<import('axios').AxiosResponse<any, any>>
2
4
  //# sourceMappingURL=com.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"com.d.ts","sourceRoot":"","sources":["../../src/api/com.ts"],"names":[],"mappings":"AAKA,wBAAgB,cAAc,CAAC,MAAM,KAAA,+CAKpC"}
1
+ {"version":3,"file":"com.d.ts","sourceRoot":"","sources":["../../src/api/com.ts"],"names":[],"mappings":"AAKA,wBAAgB,cAAc,CAAC,MAAM,KAAA,oDAKpC"}
@@ -1,2 +1,4 @@
1
- export declare function listIndexDescApi(params: any): Promise<import('axios').AxiosResponse<any>>
1
+ export declare function listIndexDescApi(
2
+ params: any,
3
+ ): Promise<import('axios').AxiosResponse<any, any>>
2
4
  //# sourceMappingURL=index-desc.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-desc.d.ts","sourceRoot":"","sources":["../../src/api/index-desc.ts"],"names":[],"mappings":"AAKA,wBAAgB,gBAAgB,CAAC,MAAM,KAAA,+CAEtC"}
1
+ {"version":3,"file":"index-desc.d.ts","sourceRoot":"","sources":["../../src/api/index-desc.ts"],"names":[],"mappings":"AAKA,wBAAgB,gBAAgB,CAAC,MAAM,KAAA,oDAEtC"}
@@ -1,6 +1,6 @@
1
- export * from './platform'
2
- export * from './com'
3
- export * from './index-desc'
4
- export * from './item'
5
- export * from './user'
6
- //# sourceMappingURL=index.d.ts.map
1
+ export * from './platform';
2
+ export * from './com';
3
+ export * from './index-desc';
4
+ export * from './item';
5
+ export * from './user';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,6 @@
1
- export declare function listItemTreeApi(params: any): Promise<import('axios').AxiosResponse<any>>
2
- export declare function getPriceInfo(): Promise<import('axios').AxiosResponse<any>>
3
- export declare function getItem(params: any): Promise<import('axios').AxiosResponse<any>>
1
+ export declare function listItemTreeApi(
2
+ params: any,
3
+ ): Promise<import('axios').AxiosResponse<any, any>>
4
+ export declare function getPriceInfo(): Promise<import('axios').AxiosResponse<any, any>>
5
+ export declare function getItem(params: any): Promise<import('axios').AxiosResponse<any, any>>
4
6
  //# sourceMappingURL=item.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"item.d.ts","sourceRoot":"","sources":["../../src/api/item.ts"],"names":[],"mappings":"AAKA,wBAAgB,eAAe,CAAC,MAAM,KAAA,+CAOrC;AACD,wBAAgB,YAAY,gDAE3B;AACD,wBAAgB,OAAO,CAAC,MAAM,KAAA,+CAE7B"}
1
+ {"version":3,"file":"item.d.ts","sourceRoot":"","sources":["../../src/api/item.ts"],"names":[],"mappings":"AAKA,wBAAgB,eAAe,CAAC,MAAM,KAAA,oDAOrC;AACD,wBAAgB,YAAY,qDAE3B;AACD,wBAAgB,OAAO,CAAC,MAAM,KAAA,oDAE7B"}
@@ -1,7 +1,7 @@
1
1
  export namespace Base64 {
2
- let Base64Chars: string
3
- function encode(s: any): any
4
- function ucs2_utf8(s: any): any[]
5
- function utf8_ucs2(s: any): string
2
+ let Base64Chars: string;
3
+ function encode(s: any): any;
4
+ function ucs2_utf8(s: any): any[];
5
+ function utf8_ucs2(s: any): string;
6
6
  }
7
- //# sourceMappingURL=base64.d.ts.map
7
+ //# sourceMappingURL=base64.d.ts.map
@@ -1,4 +1,6 @@
1
- export declare function getDictsMapApi(dictId: string): Promise<import('axios').AxiosResponse<any>>
1
+ export declare function getDictsMapApi(
2
+ dictId: string,
3
+ ): Promise<import('axios').AxiosResponse<any, any>>
2
4
  export declare function getDictApi(dictId: string): Promise<any>
3
5
  export declare function getDictMapApi(dictIdArr: string[]): Promise<{}>
4
6
  //# sourceMappingURL=dict.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dict.d.ts","sourceRoot":"","sources":["../../../src/api/platform/dict.ts"],"names":[],"mappings":"AAMA,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,+CAE5C;AAED,wBAAsB,UAAU,CAAC,MAAM,EAAE,MAAM,gBAgB9C;AAkBD,wBAAsB,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,eActD"}
1
+ {"version":3,"file":"dict.d.ts","sourceRoot":"","sources":["../../../src/api/platform/dict.ts"],"names":[],"mappings":"AAMA,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,oDAE5C;AAED,wBAAsB,UAAU,CAAC,MAAM,EAAE,MAAM,gBAgB9C;AAkBD,wBAAsB,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,eActD"}
@@ -1,5 +1,5 @@
1
- export * from './dict'
2
- export * from './menu'
3
- export * from './oss'
4
- export * from './user'
5
- //# sourceMappingURL=index.d.ts.map
1
+ export * from './dict';
2
+ export * from './menu';
3
+ export * from './oss';
4
+ export * from './user';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -1,17 +1,21 @@
1
- export declare function getPermissionApi(): Promise<import('axios').AxiosResponse<any>>
2
- export declare function getMenuHistoryApi(): Promise<import('axios').AxiosResponse<any>>
3
- export declare function menuHistoryApi(params: any): Promise<import('axios').AxiosResponse<any>>
1
+ export declare function getPermissionApi(): Promise<import('axios').AxiosResponse<any, any>>
2
+ export declare function getMenuHistoryApi(): Promise<import('axios').AxiosResponse<any, any>>
3
+ export declare function menuHistoryApi(
4
+ params: any,
5
+ ): Promise<import('axios').AxiosResponse<any, any>>
4
6
  export declare function deleteMenuHistoryApi(
5
7
  historyId: any,
6
- ): Promise<import('axios').AxiosResponse<any>>
7
- export declare function getMenuCollectApi(): Promise<import('axios').AxiosResponse<any>>
8
- export declare function addMenuCollectApi(params: any): Promise<import('axios').AxiosResponse<any>>
8
+ ): Promise<import('axios').AxiosResponse<any, any>>
9
+ export declare function getMenuCollectApi(): Promise<import('axios').AxiosResponse<any, any>>
10
+ export declare function addMenuCollectApi(
11
+ params: any,
12
+ ): Promise<import('axios').AxiosResponse<any, any>>
9
13
  export declare function deleteMenuCollectApi(
10
14
  collectId: any,
11
- ): Promise<import('axios').AxiosResponse<any>>
15
+ ): Promise<import('axios').AxiosResponse<any, any>>
12
16
  export declare function removeMenuCollectApi(
13
17
  params: any,
14
- ): Promise<import('axios').AxiosResponse<any>>
15
- export declare function getAppListApi(): Promise<import('axios').AxiosResponse<any>>
16
- export declare function getMaxTabNumValueApi(): Promise<import('axios').AxiosResponse<any>>
18
+ ): Promise<import('axios').AxiosResponse<any, any>>
19
+ export declare function getAppListApi(): Promise<import('axios').AxiosResponse<any, any>>
20
+ export declare function getMaxTabNumValueApi(): Promise<import('axios').AxiosResponse<any, any>>
17
21
  //# sourceMappingURL=menu.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../../src/api/platform/menu.ts"],"names":[],"mappings":"AAKA,wBAAgB,gBAAgB,gDAE/B;AAED,wBAAgB,iBAAiB,gDAEhC;AAED,wBAAgB,cAAc,CAAC,MAAM,KAAA,+CAEpC;AAED,wBAAgB,oBAAoB,CAAC,SAAS,KAAA,+CAE7C;AAED,wBAAgB,iBAAiB,gDAEhC;AAED,wBAAgB,iBAAiB,CAAC,MAAM,KAAA,+CAEvC;AAED,wBAAgB,oBAAoB,CAAC,SAAS,KAAA,+CAE7C;AAED,wBAAgB,oBAAoB,CAAC,MAAM,KAAA,+CAE1C;AAED,wBAAgB,aAAa,gDAE5B;AAED,wBAAgB,oBAAoB,gDAEnC"}
1
+ {"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../../src/api/platform/menu.ts"],"names":[],"mappings":"AAKA,wBAAgB,gBAAgB,qDAE/B;AAED,wBAAgB,iBAAiB,qDAEhC;AAED,wBAAgB,cAAc,CAAC,MAAM,KAAA,oDAEpC;AAED,wBAAgB,oBAAoB,CAAC,SAAS,KAAA,oDAE7C;AAED,wBAAgB,iBAAiB,qDAEhC;AAED,wBAAgB,iBAAiB,CAAC,MAAM,KAAA,oDAEvC;AAED,wBAAgB,oBAAoB,CAAC,SAAS,KAAA,oDAE7C;AAED,wBAAgB,oBAAoB,CAAC,MAAM,KAAA,oDAE1C;AAED,wBAAgB,aAAa,qDAE5B;AAED,wBAAgB,oBAAoB,qDAEnC"}
@@ -22,7 +22,7 @@ export declare function putOssFileUrl(): string
22
22
  export declare function getOssFileApi(
23
23
  fileId: string,
24
24
  responseType?: ResponseType,
25
- ): Promise<import('axios').AxiosResponse<any>>
25
+ ): Promise<import('axios').AxiosResponse<any, any>>
26
26
  /**
27
27
  * 将文件上传到文档中心
28
28
  *
@@ -42,5 +42,5 @@ export declare function putOssFileApi(
42
42
  */
43
43
  export declare function getPreviewUrlApi(
44
44
  fileId: string,
45
- ): Promise<import('axios').AxiosResponse<any>>
45
+ ): Promise<import('axios').AxiosResponse<any, any>>
46
46
  //# sourceMappingURL=oss.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"oss.d.ts","sourceRoot":"","sources":["../../../src/api/platform/oss.ts"],"names":[],"mappings":"AAEA,OAAO,EAAsB,YAAY,EAAE,MAAM,OAAO,CAAA;AAIxD;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,MAAM,SAAK,UAExC;AAED;;;;GAIG;AACH,wBAAgB,aAAa,WAE5B;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,YAAY,+CAMxE;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,qCAUzD;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,+CAQ9C"}
1
+ {"version":3,"file":"oss.d.ts","sourceRoot":"","sources":["../../../src/api/platform/oss.ts"],"names":[],"mappings":"AAEA,OAAO,EAAsB,YAAY,EAAE,MAAM,OAAO,CAAA;AAIxD;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,MAAM,SAAK,UAExC;AAED;;;;GAIG;AACH,wBAAgB,aAAa,WAE5B;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,YAAY,oDAMxE;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,qCAUzD;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,oDAQ9C"}
@@ -8,10 +8,12 @@ export declare function loginApi({
8
8
  password: any
9
9
  validCodeId: any
10
10
  validCodeInput: any
11
- }): Promise<import('axios').AxiosResponse<any>>
12
- export declare function getUserInfoApi(): Promise<import('axios').AxiosResponse<any>>
13
- export declare function getGlobalPolicyApi(): Promise<import('axios').AxiosResponse<any>>
14
- export declare function updatePasswordApi(data: any): Promise<import('axios').AxiosResponse<any>>
11
+ }): Promise<import('axios').AxiosResponse<any, any>>
12
+ export declare function getUserInfoApi(): Promise<import('axios').AxiosResponse<any, any>>
13
+ export declare function getGlobalPolicyApi(): Promise<import('axios').AxiosResponse<any, any>>
14
+ export declare function updatePasswordApi(
15
+ data: any,
16
+ ): Promise<import('axios').AxiosResponse<any, any>>
15
17
  export declare function getCaptchaURL(validCodeId: string): string
16
- export declare function logoutApi(): Promise<import('axios').AxiosResponse<any>>
18
+ export declare function logoutApi(): Promise<import('axios').AxiosResponse<any, any>>
17
19
  //# sourceMappingURL=user.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../src/api/platform/user.ts"],"names":[],"mappings":"AAMA,wBAAgB,QAAQ,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,cAAc,EAAE;;;;;CAAA,+CAQ3E;AAED,wBAAgB,cAAc,gDAE7B;AAED,wBAAgB,kBAAkB,gDAEjC;AAED,wBAAgB,iBAAiB,CAAC,IAAI,KAAA,+CAErC;AAED,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,UAEhD;AAED,wBAAgB,SAAS,gDAExB"}
1
+ {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../src/api/platform/user.ts"],"names":[],"mappings":"AAMA,wBAAgB,QAAQ,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,cAAc,EAAE;;;;;CAAA,oDAQ3E;AAED,wBAAgB,cAAc,qDAE7B;AAED,wBAAgB,kBAAkB,qDAEjC;AAED,wBAAgB,iBAAiB,CAAC,IAAI,KAAA,oDAErC;AAED,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,UAEhD;AAED,wBAAgB,SAAS,qDAExB"}
@@ -1,2 +1,4 @@
1
- export declare function listUserTreeApi(params: any): Promise<import('axios').AxiosResponse<any>>
1
+ export declare function listUserTreeApi(
2
+ params: any,
3
+ ): Promise<import('axios').AxiosResponse<any, any>>
2
4
  //# sourceMappingURL=user.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/api/user.ts"],"names":[],"mappings":"AAKA,wBAAgB,eAAe,CAAC,MAAM,KAAA,+CAErC"}
1
+ {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/api/user.ts"],"names":[],"mappings":"AAKA,wBAAgB,eAAe,CAAC,MAAM,KAAA,oDAErC"}
@@ -1,34 +1,34 @@
1
1
  declare const _default: {
2
- title: string
3
- icomId: string
4
- showMenus: boolean
5
- routerBase: string
6
- loginRouteName: string
7
- rootRouteName: string
8
- homeRouteName: string
9
- authServerContext: string
10
- ossServerContext: string
11
- ismAmServerContext: string
12
- ismAcServerContext: string
13
- ismSqServerContext: string
14
- ilmServerContext: string
15
- imgServerContext: string
16
- imaServerContext: string
17
- ucExtServerContext: string
18
- dataManageServerContext: string
19
- kkfilepreviewContext: string
20
- errorMessage: string
21
- leftLockDays: number
22
- labelStyle: {
23
- labelWidthButton: number
24
- labelWidthSmall: number
25
- labelWidthMiddle: number
26
- labelWidthMiddleLarge: number
27
- labelWidthLarge: number
28
- labelWidthSuperLarge: number
29
- }
30
- /** 点击跳转的文字颜色 */
31
- linkColor: string
32
- }
33
- export default _default
34
- //# sourceMappingURL=base.config.d.ts.map
2
+ title: string;
3
+ icomId: string;
4
+ showMenus: boolean;
5
+ routerBase: string;
6
+ loginRouteName: string;
7
+ rootRouteName: string;
8
+ homeRouteName: string;
9
+ authServerContext: string;
10
+ ossServerContext: string;
11
+ ismAmServerContext: string;
12
+ ismAcServerContext: string;
13
+ ismSqServerContext: string;
14
+ ilmServerContext: string;
15
+ imgServerContext: string;
16
+ imaServerContext: string;
17
+ ucExtServerContext: string;
18
+ dataManageServerContext: string;
19
+ kkfilepreviewContext: string;
20
+ errorMessage: string;
21
+ leftLockDays: number;
22
+ labelStyle: {
23
+ labelWidthButton: number;
24
+ labelWidthSmall: number;
25
+ labelWidthMiddle: number;
26
+ labelWidthMiddleLarge: number;
27
+ labelWidthLarge: number;
28
+ labelWidthSuperLarge: number;
29
+ };
30
+ /** 点击跳转的文字颜色 */
31
+ linkColor: string;
32
+ };
33
+ export default _default;
34
+ //# sourceMappingURL=base.config.d.ts.map
@@ -1,4 +1,4 @@
1
1
  export declare function getDevConfig(): {
2
- showMenus: boolean
3
- }
4
- //# sourceMappingURL=dev.config.d.ts.map
2
+ showMenus: boolean;
3
+ };
4
+ //# sourceMappingURL=dev.config.d.ts.map
@@ -1,6 +1,6 @@
1
- declare let config: any
2
- declare function useConfig(isDev?: boolean): any
3
- declare function setConfig(key: any, value: any): void
4
- export default config
5
- export { config, useConfig, setConfig }
6
- //# sourceMappingURL=index.d.ts.map
1
+ declare let config: any;
2
+ declare function useConfig(isDev?: boolean): any;
3
+ declare function setConfig(key: any, value: any): void;
4
+ export default config;
5
+ export { config, useConfig, setConfig };
6
+ //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,4 @@
1
1
  export declare function getProdConfig(): {
2
- showMenus: boolean
3
- }
4
- //# sourceMappingURL=prod.config.d.ts.map
2
+ showMenus: boolean;
3
+ };
4
+ //# sourceMappingURL=prod.config.d.ts.map
package/types/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export * from './api'
2
- export * from './config'
3
- export * from './utils'
4
- //# sourceMappingURL=index.d.ts.map
1
+ export * from './api';
2
+ export * from './config';
3
+ export * from './utils';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -1,23 +1,23 @@
1
1
  declare let Base64ForLogin: {
2
- Base64Chars: string
3
- /**
4
- * Encode a string to a Base64 string follow Bse64 regular.
5
- * @param s, a normal string
6
- * @return a Base64 string
7
- */
8
- encode: (s: any) => any
9
- /**
10
- * Encodes a ucs2 string to a utf8 integer array.
11
- * @param s, a string
12
- * @return an integer array
13
- */
14
- ucs2_utf8: (s: any) => any[]
15
- /**
16
- * Encodes a utf8 integer array to a ucs2 string.
17
- * @param s, an integer array
18
- * @return a string
19
- */
20
- utf8_ucs2: (s: any) => string
21
- }
22
- export { Base64ForLogin }
23
- //# sourceMappingURL=base64.d.ts.map
2
+ Base64Chars: string;
3
+ /**
4
+ * Encode a string to a Base64 string follow Bse64 regular.
5
+ * @param s, a normal string
6
+ * @return a Base64 string
7
+ */
8
+ encode: (s: any) => any;
9
+ /**
10
+ * Encodes a ucs2 string to a utf8 integer array.
11
+ * @param s, a string
12
+ * @return an integer array
13
+ */
14
+ ucs2_utf8: (s: any) => any[];
15
+ /**
16
+ * Encodes a utf8 integer array to a ucs2 string.
17
+ * @param s, an integer array
18
+ * @return a string
19
+ */
20
+ utf8_ucs2: (s: any) => string;
21
+ };
22
+ export { Base64ForLogin };
23
+ //# sourceMappingURL=base64.d.ts.map
@@ -5,6 +5,6 @@
5
5
  * @param contentType 数据的MIME Type,如 png 为 image/png
6
6
  * @returns Blob数据
7
7
  */
8
- export declare function base64ToBlob(base64Data: string, contentType: string): Blob
9
- export declare function blobToBase64(blob: Blob, hasPrefix?: boolean): Promise<unknown>
10
- //# sourceMappingURL=blob.d.ts.map
8
+ export declare function base64ToBlob(base64Data: string, contentType: string): Blob;
9
+ export declare function blobToBase64(blob: Blob, hasPrefix?: boolean): Promise<unknown>;
10
+ //# sourceMappingURL=blob.d.ts.map
@@ -1,3 +1,3 @@
1
- export declare function getDictCache(dictId: string): any
2
- export declare function setDictCache(dictId: string, data: any): void
3
- //# sourceMappingURL=dict-cache.d.ts.map
1
+ export declare function getDictCache(dictId: string): any;
2
+ export declare function setDictCache(dictId: string, data: any): void;
3
+ //# sourceMappingURL=dict-cache.d.ts.map
@@ -1,4 +1,4 @@
1
- export declare function getIndexDescCache(): any
2
- export declare function setIndexDescCache(data: any): void
3
- export declare function clearIndexDescCache(): void
4
- //# sourceMappingURL=index-desc.d.ts.map
1
+ export declare function getIndexDescCache(): any;
2
+ export declare function setIndexDescCache(data: any): void;
3
+ export declare function clearIndexDescCache(): void;
4
+ //# sourceMappingURL=index-desc.d.ts.map
@@ -1,4 +1,4 @@
1
- export * from './index-desc'
2
- export * from './permission-cache'
3
- export * from './user-cache'
4
- //# sourceMappingURL=index.d.ts.map
1
+ export * from './index-desc';
2
+ export * from './permission-cache';
3
+ export * from './user-cache';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,4 @@
1
- export declare function getPermissionCache(): any
2
- export declare function setPermissionCache(data: any): void
3
- export declare function clearPermissionCache(): void
4
- //# sourceMappingURL=permission-cache.d.ts.map
1
+ export declare function getPermissionCache(): any;
2
+ export declare function setPermissionCache(data: any): void;
3
+ export declare function clearPermissionCache(): void;
4
+ //# sourceMappingURL=permission-cache.d.ts.map
@@ -1,4 +1,4 @@
1
- export declare function getUserInfoCache(): any
2
- export declare function setUserInfoCache(data: any): void
3
- export declare function clearUserInfoCache(): void
4
- //# sourceMappingURL=user-cache.d.ts.map
1
+ export declare function getUserInfoCache(): any;
2
+ export declare function setUserInfoCache(data: any): void;
3
+ export declare function clearUserInfoCache(): void;
4
+ //# sourceMappingURL=user-cache.d.ts.map
@@ -1,4 +1,4 @@
1
- export declare function str2Date(value: string): Date
2
- export declare function formatDate(value: string): string
3
- export declare function formatDateChinese(value: string): string
4
- //# sourceMappingURL=date.d.ts.map
1
+ export declare function str2Date(value: string): Date;
2
+ export declare function formatDate(value: string): string;
3
+ export declare function formatDateChinese(value: string): string;
4
+ //# sourceMappingURL=date.d.ts.map