“PropType“ 是一种类型,在同时启用了 “preserveValueImports“ 和 “isolatedModules“ 时,必须使用仅类型导入进行导入。

“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"
    }
  ]
}

猜你喜欢

转载自blog.csdn.net/qq_43198727/article/details/127755623
今日推荐