mirror of
https://github.com/kailong321200875/vue-element-plus-admin.git
synced 2024-11-27 01:19:56 +08:00
fix: 修复请求示例中,mock开启时无法取消单个请求的问题
This commit is contained in:
parent
14ff83affc
commit
d6d70a443c
@ -18,7 +18,7 @@ axiosInstance.interceptors.request.use((res: InternalAxiosRequestConfig) => {
|
||||
const controller = new AbortController()
|
||||
const url = res.url || ''
|
||||
res.signal = controller.signal
|
||||
abortControllerMap.set(url, controller)
|
||||
abortControllerMap.set(import.meta.env.VITE_USE_MOCK ? url.replace('/mock', '') : url, controller)
|
||||
return res
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user