vue3 setup syntactic sugar TS introduces components and reports errors

insert image description here
Vue3 setup syntactic sugar TS introduces components and reports errors:

Module '"d:/git/sofar-energy-storage-pc/src/components/ComTable/BaseComTable.vue"'
has no default export.Vetur(1192)

The VsCode plug-in Vetur reported an error: the component did not throw.
It is because Vetur(v0.35.0) does not support ts yet.

Solution:

Replace the syntax highlighting plug-in Volar that supports ts to replace Vetur.

Disable Vetur
insert image description here
Enable Volar
insert image description here

The error disappears:
insert image description here

Guess you like

Origin blog.csdn.net/weixin_45288172/article/details/130062179