admin管理员组文章数量:1640988
发现问题
vscode
安装 Vue Language Features (volar)
后出现 :
TypeScript intellisense is disabled on template, you can config “jsx”: “preserve” in tsconfig or jsconfig to enable it, or config vueCompilerOptions.experimentalDisableTemplateSupport to disable this prompt.
解决问题
问题的描述是:TypeScript智能感知在模板中是禁用的,你可以在tsconfig或jsconfig中配置’ “jsx”: "preserve"来启用它,或者配置’ vueCompilerOptions '。 使用experimentalDisableTemplateSupport来禁用这个提示。那么我们根据描述解决问题
// 在文件 jsconfig.json 中
{
"compilerOptions": {
"baseUrl": "./",
"paths": {
"@/*": [
"src/*"
]
},
"jsx": "preserve" //添加配置
},
"exclude": [
"node_modules",
"dist"
]
}
问题得以解决。
如果还会存在问题,可以使用vetur
插件格式化文档。将Vue Language Features (volar)
禁用后重启VScode即可。
点赞 评论 收藏 ~~ 留言讨论,如有错误,也希望大家不吝指出。 ~~ 点赞 评论 收藏
本文标签: 报错typescriptVSCodetemplatedisabled
版权声明:本文标题:VScode 报错 TypeScript intellisense is disabled on template 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://m.elefans.com/dongtai/1729318957a1195641.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论