Skip to content

Commit

Permalink
fix(example): 修复文档中vue3自定义组件不能正常显示bug
Browse files Browse the repository at this point in the history
  • Loading branch information
zkt2002 authored and boyongjiong committed Oct 28, 2024
1 parent 4334960 commit ef64f50
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion examples/vue3-app/src/views/LogicFlowView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ const data = {
const lfRef = ref<LogicFlow | null>(null)
const containerRef = ref<HTMLDivElement | null>(null)
const flowId = ref('')
const TeleportContainer = getTeleport()
const registerElements = (lf: LogicFlow) => {
Expand Down Expand Up @@ -194,6 +195,10 @@ onMounted(() => {
lf
)
lf.on('graph:rendered', ({ graphModel }) => {
flowId.value = graphModel.flowId!
})
// 注册事件
registerEvents(lf)
lf.render(data)
Expand Down Expand Up @@ -433,7 +438,7 @@ const handleDragText = () => {
</div>
<el-divider />
<div ref="containerRef" id="graph" class="viewport"></div>
<TeleportContainer />
<TeleportContainer :flow-id="flowId" />
</el-card>
</template>

Expand Down

0 comments on commit ef64f50

Please sign in to comment.