template报下面的错误
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 `"exper
今天在打开项目的时候遇到了这个错误:
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
将这段代码复制进去:
{
"compilerOptions": {
"target": "es5",
"module": "esnext",
"baseUrl": "./",
"jsx": "preserve", //在这里添加"jsx": "preserve",
"moduleResolution": "node",
"paths": {
"@/*": [
"src/*"
]
},
"lib": [
"esnext",
"dom",
"dom.iterable",
"scripthost"
]
}
}

以下内容为一个vue中常见的错误
vue.esm.js?efeb:628 [Vue warn]: Error in nextTick: "InvalidCharacterError: Failed to execute 'setAttribute' on 'Element': 'width:60%' is not a valid attribute name."[Vue warn]: Error in nextTick: "InvalidCharacterError: Failed to execute 'setAttribute' on 'Element': 'width:60%' is not a valid attribute name."
warn @ vue.esm.js?efeb:628
logError @ vue.esm.js?efeb:1902
globalHandleError @ vue.esm.js?efeb:1897
handleError @ vue.esm.js?efeb:1857
eval @ vue.esm.js?efeb:2000
flushCallbacks @ vue.esm.js?efeb:1924
Promise.then(异步)
timerFunc @ vue.esm.js?efeb:1951
nextTick @ vue.esm.js?efeb:2008
queueWatcher @ vue.esm.js?efeb:4427
update @ vue.esm.js?efeb:4569
notify @ vue.esm.js?efeb:739
reactiveSetter @ vue.esm.js?efeb:1064
eval @ vue-router.esm.js?fe87:3003
eval @ vue-router.esm.js?fe87:3002
updateRoute @ vue-router.esm.js?fe87:2414
eval @ vue-router.esm.js?fe87:2263
eval @ vue-router.esm.js?fe87:2402
step @ vue-router.esm.js?fe87:2001
step @ vue-router.esm.js?fe87:2008
runQueue @ vue-router.esm.js?fe87:2012
更多推荐



所有评论(0)