vue3 + vite + element-plus 所有的组件都提示下面的错误?

项目运行和编译都没有问题只是vscode中一直都有红色波浪线警告。

而且只是element-plus的组件报错,其他的不报错

image.png

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"]
}
阅读 2.8k
1 个回答
✓ 已被采纳
推荐问题
logo
Microsoft
子站问答
访问
宣传栏