-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
小地图会影响vue组件,导致vue组件会进两次mounted,性能上可能会有影响。 #3738
Comments
这里。小地图也是一样的组件。进行两次mount是正常的。 你这里的需求,可以参考https://x6.antv.antgroup.com/tutorial/plugins/minimap 文档中针对小地图生成简单的view,这样小地图中的view可以更简单。不用走复杂的逻辑。 |
我这个是小地图一开始应该就创建好了,后面创建的vue节点每次都会进两次mounted,是自定义vue节点的mounted。 |
|
小地图,也是一个画布。 |
|
This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread. |
Describe the bug
用vue绘制的节点,发现修改数据,监听node.on("change:data", ({ current }) => {console.log(current)})每次都会输出两个current,我在在mounted的时候去订阅的数据变更,我发现mounted进了两次,逐步排查之后,发现把小地图去掉就不会进两次mounted了。其他的节点暂时还不知道有没有影响,希望排查下。
Your Example Website or App
https://codesandbox.io/p/sandbox/quirky-forest-7j89x6?file=%2Fsrc%2Fcomponents%2FHelloWorld.vue%3A23%2C3-23%2C78
Steps to Reproduce the Bug or Issue
graph.use(new MiniMap({ container: document.getElementById("minimap")! })); vue节点会进入两次mounted。
Expected behavior
加小地图应该不影响节点绘制
Screenshots or Videos
No response
Platform
Additional context
No response
The text was updated successfully, but these errors were encountered: