vscode的vue文件 写ts语法报这个错误
类型注释只能在TypeScript文件中使用
解决方法:ctrl+shipt+p 然后输入Preferences: Open User Settings或Preferences: Open Workspace Settings。选择找到settings.json文件
找到files.associations 把vue的html改成vue就不报错了
Type annotations can only be used in TypeScript files
最新推荐文章于 2025-02-05 18:09:26 发布