Commit c118e83a2be9e36f474a6bc16b8c6744dae51286
Committed by
GitHub
1 parent
31d44ad3
修复axios中responseInterceptorsCatch的类型 (#2811)
* fix(table): 使用lodash 的merge来递归assign,优化在多对象嵌套情况下的结构 * fix(view): 修复登入页面点击其他登入方式后返回时视图异常的bug * fix(util): 修复类型错误
Showing
2 changed files
with
3 additions
and
3 deletions
src/utils/http/axios/axiosTransform.ts
src/utils/http/axios/index.ts
1 | 1 | // axios配置 可自行根据项目进行更改,只需更改该文件即可,其他文件可以不动 |
2 | 2 | // The axios configuration can be changed according to the project, just change the file, other files can be left unchanged |
3 | 3 | |
4 | -import type { AxiosResponse } from 'axios'; | |
4 | +import type { AxiosInstance, AxiosResponse } from 'axios'; | |
5 | 5 | import { clone } from 'lodash-es'; |
6 | 6 | import type { RequestOptions, Result } from '/#/axios'; |
7 | 7 | import type { AxiosTransform, CreateAxiosOptions } from './axiosTransform'; |
... | ... | @@ -175,7 +175,7 @@ const transform: AxiosTransform = { |
175 | 175 | /** |
176 | 176 | * @description: 响应错误处理 |
177 | 177 | */ |
178 | - responseInterceptorsCatch: (axiosInstance: AxiosResponse, error: any) => { | |
178 | + responseInterceptorsCatch: (axiosInstance: AxiosInstance, error: any) => { | |
179 | 179 | const { t } = useI18n(); |
180 | 180 | const errorLogStore = useErrorLogStoreWithOut(); |
181 | 181 | errorLogStore.addAjaxErrorInfo(error); | ... | ... |