Skip to content

Commit

Permalink
fix(vue): add component name in connect (#2810)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouxinyong committed Feb 10, 2022
1 parent d116d27 commit 5a695c0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/vue/src/shared/connect.ts
Expand Up @@ -110,13 +110,15 @@ export function connect<T extends VueComponent>(
if (isVue2) {
const functionalComponent = defineComponent({
functional: true,
name: target.name,
render(h, context) {
return h(Component, context.data, context.children)
},
})
return markRaw(functionalComponent) as T
} else {
const functionalComponent = defineComponent({
name: target.name,
setup(props, { attrs, slots }) {
return () => {
return h(Component, { props, attrs }, slots)
Expand Down

0 comments on commit 5a695c0

Please sign in to comment.