【vue】TypeScript 错误“property does not exist on value of type”

最简单的解决方式是:加 as any

eg:y.x报错,则改为(y as any).x

暴露全局变量

src下新建文件shime-vue.d.ts
declare module 'nprogress';

declare module 'axios' {
     
  interface AxiosInstance {
     
    (config: AxiosRequestConfig): Promise<any>
  }
}

你可能感兴趣的:(vue,小问题)