@lambo-design/shared 1.0.0-beta.308 → 1.0.0-beta.309
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/package.json
CHANGED
|
@@ -5,6 +5,7 @@ import Bus from '../bus';
|
|
|
5
5
|
import headers from './headers';
|
|
6
6
|
import {throttle} from "./throttle";
|
|
7
7
|
import abortController from "./abort-controller"
|
|
8
|
+
import cancelToken from "./cancel-token"
|
|
8
9
|
let timer1, timer2;
|
|
9
10
|
let hasDialog = false;
|
|
10
11
|
|
|
@@ -64,13 +65,13 @@ function requestInterceptors(config) {
|
|
|
64
65
|
// 添加防止重复提交
|
|
65
66
|
if(process.env.IF_OPEN_NO_REPEAT_SUBMIT && process.env.IF_OPEN_NO_REPEAT_SUBMIT === "true"){
|
|
66
67
|
// throttle(config);
|
|
67
|
-
|
|
68
|
-
? config.ignoreCancelToken
|
|
69
|
-
: true;
|
|
70
|
-
|
|
71
|
-
if(!ignoreCancelToken){
|
|
68
|
+
if(!config.ignoreCancelToken){
|
|
72
69
|
abortController.addPending(config);
|
|
73
70
|
}
|
|
71
|
+
// if(!config.isNotCancel){
|
|
72
|
+
// cancelToken.removePending(config)
|
|
73
|
+
// config = cancelToken.addPending(config)
|
|
74
|
+
// }
|
|
74
75
|
}
|
|
75
76
|
|
|
76
77
|
|
package/utils/ajax/throttle.js
CHANGED