ztxkutils 2.10.33 → 2.10.35
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/axiosCancel.d.ts +18 -0
- package/dist/fileOperation.js +2 -0
- package/dist/index.js +1 -1
- package/dist/request-8e2b5826.js +2883 -0
- package/dist/request.d.ts +1 -0
- package/dist/request.js +1 -1
- package/package.json +1 -1
@@ -0,0 +1,18 @@
|
|
1
|
+
import { AxiosRequestConfig, AxiosResponse } from 'axios';
|
2
|
+
declare class AxiosCancel {
|
3
|
+
private pendingRequests;
|
4
|
+
/**
|
5
|
+
* 获取请求参数唯一key值
|
6
|
+
*/
|
7
|
+
private getKey;
|
8
|
+
/**
|
9
|
+
* @description 发起请求之前,拦截重复请求
|
10
|
+
*/
|
11
|
+
pendingRequestCancel(config: AxiosRequestConfig): void;
|
12
|
+
/**
|
13
|
+
* @description 请求完成之后, 清除pendingRequest
|
14
|
+
*/
|
15
|
+
clearPendingRequest(reponse: AxiosResponse): void;
|
16
|
+
}
|
17
|
+
declare const _default: AxiosCancel;
|
18
|
+
export default _default;
|
package/dist/fileOperation.js
CHANGED
@@ -205,6 +205,7 @@ function previewFile(fileUrl, fileId, otherOption) {
|
|
205
205
|
? fileUrl.slice(0, fileUrl.length - 1)
|
206
206
|
: fileUrl;
|
207
207
|
if (titleName) {
|
208
|
+
titleName = titleName + "-" + Date.now();
|
208
209
|
window.open(_fileUrl + "/attchPreview?attachId=" + fileId + "&Zmdms-Auth=bearer " + token + "&titleName=" + encodeURIComponent(titleName) + "&officePreviewType=pdf");
|
209
210
|
}
|
210
211
|
else {
|
@@ -262,6 +263,7 @@ function createOriginalUrl(fileUrl, fileId, otherOption) {
|
|
262
263
|
? fileUrl.slice(0, fileUrl.length - 1)
|
263
264
|
: fileUrl;
|
264
265
|
if (titleName) {
|
266
|
+
titleName = titleName + "-" + Date.now();
|
265
267
|
return _fileUrl + "/attchPreview?attachId=" + fileId + "&Zmdms-Auth=bearer " + token + "&titleName=" + encodeURIComponent(titleName) + "&officePreviewType=pdf";
|
266
268
|
}
|
267
269
|
else {
|
package/dist/index.js
CHANGED
@@ -2,7 +2,7 @@ export { c as authority } from './authority-e6bde99f.js';
|
|
2
2
|
export { d as dataModel } from './dataModel-1fbaff40.js';
|
3
3
|
export { t as tools } from './tools-09a4d620.js';
|
4
4
|
export { v as validate } from './validate-6e735536.js';
|
5
|
-
export { r as request } from './request-
|
5
|
+
export { r as request } from './request-8e2b5826.js';
|
6
6
|
export { r as reqUrl } from './reqUrl-787dd9e5.js';
|
7
7
|
import './tslib.es6-35653116.js';
|
8
8
|
import 'dayjs';
|