zhuliu 1 年之前
父節點
當前提交
59eff98e2b
共有 1 個文件被更改,包括 10 次插入0 次删除
  1. 10 0
      src/utils/clearHttpRequest.js

+ 10 - 0
src/utils/clearHttpRequest.js

@@ -0,0 +1,10 @@
+export let httpRequestList = []
+
+export const clearHttpRequestingList = () =>{
+    if(httpRequestList.length>0){
+        httpRequestList.forEach(item=>{
+            item('interrupt')
+        })
+        httpRequestList = []
+    }
+}