From 4923c3b163072054d76fc1a1c992b3a4cca64eb8 Mon Sep 17 00:00:00 2001 From: xingyuv Date: Thu, 9 Feb 2023 14:42:56 +0800 Subject: [PATCH] fix: type error --- yudao-ui-admin-vue3/src/config/axios/service.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/yudao-ui-admin-vue3/src/config/axios/service.ts b/yudao-ui-admin-vue3/src/config/axios/service.ts index ad11dea0c..fbafd3e80 100644 --- a/yudao-ui-admin-vue3/src/config/axios/service.ts +++ b/yudao-ui-admin-vue3/src/config/axios/service.ts @@ -1,4 +1,11 @@ -import axios, { AxiosInstance, AxiosRequestHeaders, AxiosResponse, AxiosError } from 'axios' +import axios, { + AxiosInstance, + AxiosRequestHeaders, + AxiosResponse, + AxiosError, + InternalAxiosRequestConfig +} from 'axios' + import { ElMessage, ElMessageBox, ElNotification } from 'element-plus' import qs from 'qs' import { config } from '@/config/axios/config' @@ -35,7 +42,7 @@ const service: AxiosInstance = axios.create({ // request拦截器 service.interceptors.request.use( - (config) => { + (config: InternalAxiosRequestConfig) => { // 是否需要设置 token let isToken = (config!.headers || {}).isToken === false whiteList.some((v) => {