vue-property-decorator的使用方法网上例子很多,可以参考: 使用demo 这里就不说了,主要说一下遇到的问题:
1.使用报错
import {
Component, Vue,} from 'vue-property-decorator';
网上大都用的这种,我在vscode中vetur会报:Type ‘typeof import(“D:/work/working/vue-test/node_modules/vue/dist/vue”)’ is not a constructor function type.
搞了好久都不能解决,关闭vetur显然不合适,哪位大神能解决,可以给我留言
正确用法:
// An highlighted block