工作中是后端开发,前端开发是兼职,工作之余做点小项目练练手。但是用了大半年,一直以来有个问题没解决,困扰太久了,网络上也没有查到有效的资料,各种尝试也没效果,还请各位指点个解决方向
import { computed, reactive, ref } from 'vue';
computed, reactive, ref 都被标红,显示 Cannot resolve symbol 'computed' 等
导致无法对 computed 的泛型类型进行提示,开发体验很差
settings->language&Frameworks->JavaScript->Libraries ,增加了 vue ( vue ,vue-eslint-parser ,vue-router ,vue-tsc ),typescript
{
"compilerOptions": {
"target": "ES2020",
"useDefineForClassFields": true,
"module": "ESNext",
"lib": [
"ES2020",
"DOM",
"DOM.Iterable"
],
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "node",
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "preserve",
/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"baseUrl": "./",
"paths": {
"@/*": [
"src/*"
]
},
"types": [
"node",
"vite/client",
"unplugin-vue-define-options/macros-global",
"element-plus/global",
"webpack-env"
],
},
"include": [
"src/**/*.ts",
"src/**/*.d.ts",
"src/**/*.tsx",
"src/**/*.vue"
],
"references": [
{
"path": "./tsconfig.node.json"
}
]
}
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.