“PropType” 是一种类型,在同时启用了 “preserveValueImports” 和 “isolatedModules” 时,必须使用仅类型导入进行导入。
报错处理
"preserveValueImports": false,
{
"extends": "@vue/tsconfig/tsconfig.web.json",
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
},
// 加入到这里
"preserveValueImports": false,
},
"references": [
{
"path": "./tsconfig.config.json"
}
]
}