项目运行和编译都没有问题只是vscode中一直都有红色波浪线警告。
而且只是element-plus的组件报错,其他的不报错
tsconfig.json
{
"compilerOptions": {
"outDir": "./",
"target": "esnext",
"useDefineForClassFields": true,
"module": "esnext",
"moduleResolution": "node",
"strict": true,
"jsx": "preserve",
"sourceMap": true,
"resolveJsonModule": true,
"esModuleInterop": true,
"lib": ["esnext", "dom"],
"baseUrl": ".",
"allowJs": true,
"paths": {
"@/*": ["src/*"]
},
"skipLibCheck": true /* Skip type checking all .d.ts files. */,
"allowSyntheticDefaultImports": true /* 允许默认导入 */,
"forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
"types": ["./node_modules/element-plus/global"],
"typeRoots": [
"./node_modules/@types/",
"src/types"
] /* 指定多个文件夹,这些文件夹的作用类似于 './node_modules/@types'. */
},
"include": ["src/**/*.ts", "src/**/*.vue", "src/types/**/*.d.ts"],
"exclude": ["node_modules", "dist", "**/*.js", "./jenkins"]
}
volar 插件版本bug 回退到1.2.0版本即可 等后续插件作者解决后会发新版本
1.可以点卸载后再重新搜索安装 看是不是1.2.0版本 我就是这么解决了
2.可以右键点击安装另一个版本https://marketplace.visualstudio.com/_apis/public/gallery/pub...