diff --git a/packages/x6-vue-shape/src/teleport.ts b/packages/x6-vue-shape/src/teleport.ts index c91ff9fd0a1..a6f957f3762 100644 --- a/packages/x6-vue-shape/src/teleport.ts +++ b/packages/x6-vue-shape/src/teleport.ts @@ -1,4 +1,4 @@ -import { defineComponent, h, reactive, isVue3, Vue } from 'vue-demi' +import { defineComponent, h, reactive, isVue3, Teleport, markRaw, Fragment } from 'vue-demi' import { Graph } from '@antv/x6' import { VueShape } from './node' @@ -13,7 +13,6 @@ export function connect( graph: Graph, ) { if (active) { - const { Teleport, markRaw } = Vue as any items[id] = markRaw( defineComponent({ render: () => h(Teleport, { to: container } as any, [h(component, { node, graph })]), @@ -41,7 +40,6 @@ export function getTeleport(): any { throw new Error('teleport is only available in Vue3') } active = true - const { Fragment } = Vue as any return defineComponent({ setup() {