vue-vconsole-devtools icon indicating copy to clipboard operation
vue-vconsole-devtools copied to clipboard

插件识别不了装饰器写法的vue组件名称

Open simondengshuaihui opened this issue 3 years ago • 4 comments

vue版本2.x Chrome 的vue-dev-tool 版本5.3.4

使用vue-property-decorator支持的TS写法,在线上环境中识别不了组件名称 @Component export default class ComponentName extends Vue {} 具体表现为 image

但是在dev本地开发环境上是可以识别的到组件名称

simondengshuaihui avatar Jun 28 '21 09:06 simondengshuaihui

目前有一种兼容写法在@Component 中加入name属性可以被vue-dev-tool识别到

@Component({
  name: 'ComponentName'
})
export default class ComponentName extends Vue {}

simondengshuaihui avatar Jul 02 '21 08:07 simondengshuaihui

wow , 看起来是一个非常不错的临时方案,感谢分享

Zippowxk avatar Jul 02 '21 08:07 Zippowxk

已更新支持Vue3,TS兼容性更好,可能已经解决了你的问题,不妨更新一下,期待你的反馈

Zippowxk avatar Sep 13 '21 02:09 Zippowxk

已更新支持Vue3,TS兼容性更好,可能已经解决了你的问题,不妨更新一下,期待你的反馈 无法找到模块“vue-vconsole-devtools”的声明文件。“/Users***/node_modules/vue-vconsole-devtools/dist/vue_plugin.js”隐式拥有 "any" 类型。 尝试使用 npm i --save-dev @types/vue-vconsole-devtools (如果存在),或者添加一个包含 declare module 'vue-vconsole-devtools'; 的新声明(.d.ts)文件

jaspergg avatar Nov 03 '22 09:11 jaspergg