前端
sun_smell
记录bug,分享快乐!
展开
-
vue typescript 可选链访问对象中不存在的属性时报错属性不存在
vue typescript 可选链访问对象中不存在的属性时报错属性不存在原创 2023-01-29 16:40:32 · 392 阅读 · 0 评论 -
xxx is declared but its value is never read.Vetur(6133)和xxx has no default export
vue3 import导入的时候会出现这个报错提示 这是语法高亮插件Vetur提示的,因此更换支持ts的语法高亮插件即可,更换为Volar。原因是:Vetur(v0.35.0) 暂不支持ts。原创 2023-01-29 14:49:31 · 355 阅读 · 0 评论 -
vue3 ts import时报错An import path cannot end with a ‘.ts‘ extension
typeScript导入时是不需要加入扩展名.ts的,考虑到需要编译出可以用于。因此直接把.ts的后缀去掉就行了。的 JS,所以允许加。原创 2023-01-29 11:30:53 · 2164 阅读 · 0 评论 -
vue3 ts Type assertion expressions can only be used in TypeScript files
vue3 ts Type assertion expressions can only be used in TypeScript files原创 2023-01-29 11:02:07 · 1793 阅读 · 0 评论