antvis / Graphin

A React toolkit for graph visualization based on G6
https://graphin.antv.antgroup.com
MIT License
980 stars 262 forks source link

在vue3中使用veaury库引入react和grapin做拓扑图组件 #515

Open ksmarsh opened 8 months ago

ksmarsh commented 8 months ago

Describe the bug

正确加载react组件,在进行vue3 的路由切换是报错 Maximum call stack size exceeded ,排查后发现是组件Graphin 报错,但不知道是什么原因导致的

Your Example Website or App

暂无

Steps to Reproduce the Bug or Issue

创建一个vue3组件 安装 veaury库,使用 import ReactV from './react/index' import {applyReactInVue} from 'veaury' components: { ReactV :applyReactInVue(ReactV)},

在reactv组件里使用 <Graphin data={data1} height={700} layout={{ type: 'random' }}/> 要加载此组件,在vue路由跳转会报错堆栈溢出。加载其他react组件不会例如 表格。 我在veaury库的issus中作者提到堆栈溢出是由于vue 的某个属性一直循环引用渲染视图导致堆栈溢出,但我这里并没有使用变量来控制,变量都在react组件内部使用

Expected behavior

正常加载,

Screenshots or Videos

No response

Platform

Windows Chrome Version:116.0.5845.182

Additional context

No response