关于 Property 'create' does not exist on type 'typeof import("axios") 的问题
在Vue
项目中的src
目录下新建axios.d.ts
文件并键入以下代码,并重新编译运行。
import * as axios from 'axios'
declare module 'axios' {
interface AxiosInstance {
(config: AxiosRequestConfig): Promise<any>
}
}