Skip to content

Commit 5442a7d

Browse files
committed
fix: type-check
1 parent e995a66 commit 5442a7d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ui/src/request/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import axios, { type AxiosRequestConfig } from 'axios'
1+
import axios, { type InternalAxiosRequestConfig, AxiosHeaders } from 'axios'
22
import { MsgError } from '@/utils/message'
33
import type { NProgress } from 'nprogress'
44
import type { Ref } from 'vue'
@@ -19,9 +19,9 @@ const instance = axios.create(axiosConfig)
1919

2020
/* 设置请求拦截器 */
2121
instance.interceptors.request.use(
22-
(config: AxiosRequestConfig) => {
22+
(config: InternalAxiosRequestConfig) => {
2323
if (config.headers === undefined) {
24-
config.headers = {}
24+
config.headers = new AxiosHeaders()
2525
}
2626
const { user } = useStore()
2727
const token = user.getToken()

0 commit comments

Comments
 (0)