1:如果没有这个env.d.ts文件,就新建
declare module "*.vue" {import { DefineComponent } from "vue";const component: DefineComponent<{}, {}, any>;export default component;
}

2:如果需要使用@简写访问src如下
2-1:如果没有这个etsconfig.json文件,就新建
{"compilerOptions": {"target": "esnext","useDefineForClassFields": true,"module": "esnext","moduleResolution": "node","strict": true,"jsx": "preserve","sourceMap": true,"resolveJsonModule": true,"esModuleInterop": true,"lib": ["esnext", "dom"],"baseUrl": "./","allowJs": true,"forceConsistentCasingInFileNames": true,"allowSyntheticDefaultImports": true,"strictFunctionTypes": false,"noUnusedLocals": true,"noUnusedParameters": true,"experimentalDecorators": true,"noImplicitAny": false,"skipLibCheck": true,"paths": {"@/*": ["src/*"]},"types": ["vite/client"],"outDir": "target", "typeRoots": ["./node_modules/@types/", "./types"]},"include": ["src","types/**/*.d.ts","src/types/auto-imports.d.ts","src/types/auto-components.d.ts"],"exclude": ["dist", "target", "node_modules"]
}
