xframelib 0.4.5 → 0.4.6
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/README.md +2 -1
- package/dist/core/SysEvents.d.ts +7 -0
- package/dist/index.cjs +3 -3
- package/dist/index.css +69 -69
- package/dist/index.js +3 -3
- package/dist/utils/AxiosHelper.d.ts +12 -5
- package/dist/utils/BigFileDownload.d.ts +13 -2
- package/package.json +1 -1
|
@@ -7,26 +7,33 @@ export declare type ResponseType = 'arraybuffer' | 'blob' | 'document' | 'json'
|
|
|
7
7
|
* @param headers headers参数
|
|
8
8
|
* @param responseType 响应类型,默认为json
|
|
9
9
|
* @param cancelToken 取消标识
|
|
10
|
+
* @param timeoutMS 超时时间-毫秒
|
|
10
11
|
* @returns 返回Promise对象
|
|
11
12
|
*/
|
|
12
|
-
declare function requestGet(apiUrl: string, baseUrl?: string, _params?: any, headers?: any, responseType?: ResponseType, cancelToken?: any): Promise<any>;
|
|
13
|
+
declare function requestGet(apiUrl: string, baseUrl?: string, _params?: any, headers?: any, responseType?: ResponseType, cancelToken?: any, timeoutMS?: number): Promise<any>;
|
|
13
14
|
/**
|
|
14
15
|
* Post服务请求-FormData
|
|
15
16
|
* @param apiUrl API接口路径
|
|
16
17
|
* @param baseUrl 基础服务路径
|
|
17
18
|
* @param _params 参数
|
|
18
19
|
* @param headers headers参数
|
|
20
|
+
* @param responseType 返回类型,默认为json
|
|
21
|
+
* @param timeoutMS 超时时间,默认为60000毫秒
|
|
19
22
|
* @returns 返回Promise对象
|
|
20
23
|
*/
|
|
21
|
-
declare function requestPost(apiUrl: string, baseUrl?: string, _bodyParams?: any, _queryParams?: any, headers?: any, responseType?: ResponseType): Promise<any>;
|
|
24
|
+
declare function requestPost(apiUrl: string, baseUrl?: string, _bodyParams?: any, _queryParams?: any, headers?: any, responseType?: ResponseType, timeoutMS?: number): Promise<any>;
|
|
22
25
|
/**
|
|
23
26
|
* Post服务请求-Body方式
|
|
24
27
|
* @param apiUrl API接口路径
|
|
25
28
|
* @param baseUrl 基础服务路径
|
|
26
|
-
* @param
|
|
27
|
-
* @
|
|
29
|
+
* @param _bodyParams body相关参数
|
|
30
|
+
* @param _queryParams url的相关参数
|
|
31
|
+
* @param headers 头相关参数
|
|
32
|
+
* @param responseType 返回类型,默认为json
|
|
33
|
+
* @param timeoutMS 超时时间,默认为60000毫秒
|
|
34
|
+
* @returns
|
|
28
35
|
*/
|
|
29
|
-
declare function requestPostBody(apiUrl: string, baseUrl?: string, _bodyParams?: any, _queryParams?: any, headers?: any, responseType?: ResponseType): Promise<any>;
|
|
36
|
+
declare function requestPostBody(apiUrl: string, baseUrl?: string, _bodyParams?: any, _queryParams?: any, headers?: any, responseType?: ResponseType, timeoutMS?: number): Promise<any>;
|
|
30
37
|
/**
|
|
31
38
|
* 业务服务Get请求
|
|
32
39
|
* @param apiUrl API接口路径
|
|
@@ -29,7 +29,17 @@ export declare class BigFileDownload {
|
|
|
29
29
|
private cancelSource;
|
|
30
30
|
private isStarting;
|
|
31
31
|
private fileName?;
|
|
32
|
-
|
|
32
|
+
private cacheSize;
|
|
33
|
+
private requestTimeout;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @param fileID
|
|
37
|
+
* @param downloadURL 下载链接
|
|
38
|
+
* @param chunkSizeM 分片大小,默认为3M
|
|
39
|
+
* @param cacheNum 缓存大小
|
|
40
|
+
* @param requestTimeoutMS 请求超时时间(毫秒)默认为60s
|
|
41
|
+
*/
|
|
42
|
+
constructor(fileID: string, downloadURL: string, chunkSizeM?: number, cacheNum?: number, requestTimeoutMS?: number);
|
|
33
43
|
/**
|
|
34
44
|
* 订阅事件
|
|
35
45
|
*/
|
|
@@ -87,10 +97,11 @@ export declare class BigFileDownload {
|
|
|
87
97
|
* 删除下载任务
|
|
88
98
|
*/
|
|
89
99
|
delete(): void;
|
|
100
|
+
sleep(ms: any): Promise<unknown>;
|
|
90
101
|
/**
|
|
91
102
|
* 开始分段下载
|
|
92
103
|
*/
|
|
93
|
-
download(downURL?: string): void
|
|
104
|
+
download(downURL?: string): Promise<void>;
|
|
94
105
|
/**
|
|
95
106
|
* 下载完成进度
|
|
96
107
|
*/
|