Skip to content

Commit

Permalink
Fix component names in Vue 3 devtools
Browse files Browse the repository at this point in the history
  • Loading branch information
segevfiner committed Apr 18, 2023
1 parent 56288d7 commit 74cf18e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/vue-3/src/NodeViewContent.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { defineComponent, h } from 'vue'

export const NodeViewContent = defineComponent({
name: 'NodeViewContent',

props: {
as: {
type: String,
Expand Down
2 changes: 2 additions & 0 deletions packages/vue-3/src/NodeViewWrapper.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { defineComponent, h } from 'vue'

export const NodeViewWrapper = defineComponent({
name: 'NodeViewWrapper',

props: {
as: {
type: String,
Expand Down
7 changes: 7 additions & 0 deletions packages/vue-3/src/VueNodeViewRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,13 @@ class VueNodeView extends NodeView<Component, Editor, VueNodeViewRendererOptions
// @ts-ignore
// eslint-disable-next-line
__cssModules: this.component.__cssModules,
// add support for vue devtools
// @ts-ignore
// eslint-disable-next-line
__name: this.component.__name,
// @ts-ignore
// eslint-disable-next-line
__file: this.component.__file,
})

this.renderer = new VueRenderer(extendedComponent, {
Expand Down

0 comments on commit 74cf18e

Please sign in to comment.