摘要: vuex4.0.2 webstorm报如下错误 Vue: Could not find a declaration file for module vuex. 解决办法 在src目录下新建一个vuex.d.ts 文件内容如下 declare module "vuex" { export * from 阅读全文
posted @ 2024-06-24 06:10 Excel2016 阅读(703) 评论(0) 推荐(0)
摘要: 意思是说找不到对应的模块“@/views/xxx.vue”或其相应的类型声明 因为ts只能解析 .ts 文件,无法解析 .vue文件 解决方法很简单,一开始的时候env.d.ts是空文件(如vite-env.d.ts),我们可以在项目的env.d.ts中引入如下代码: declare module 阅读全文
posted @ 2024-06-24 05:46 Excel2016 阅读(1049) 评论(0) 推荐(0)