报错:TypeScript intellisense is disabled on template

115 阅读1分钟
  • 报错提示: 1.png

  • 详细信息: TypeScript intellisense is disabled on template. To enable, configure "jsx": "preserve" in the "compilerOptions" property of tsconfig or jsconfig. To disable this prompt instead, configure "experimentalDisableTemplateSupport": true in "vueCompilerOptions" property.

  • 解决方案:在jsconfig.json文件,添加"jsx":"preserve",

{
    "compilerOptions": {
        "baseUrl": "./",
        "jsx": "preserve",   //增加此行
        "paths": {
            "@/*": [
                "src/*"
            ]
        }
    },
    "exclude": [
        "node_modules",
        "dist"
    ]
}