Open TyCoding opened 1 year ago
这个Bug是不是很早之前就有了?
现象:
自定义Vue节点内容如下:
Graph定义如下:
graph.on('node:click', ({ node }) => { graph.removeNode(node) });
报错如下:
Vue节点必须只存在一个根节点时,删除Node才不报错,即使是注释行也不能存在
1
也遇到了,果然,感恩
有没有 vue 大神来修复一下。
这个和x6没有关系,是vue自身的问题:vue这边要求每一个组件的template内部只有一个root element
如果使用vue3,也尽量使用Fragment 显示的封装一层,不建议直接写多个根元素。
Fragment
感谢,果然代码里留了个注释行导致报错的,真是长见识了
Describe the bug
这个Bug是不是很早之前就有了?
现象:
自定义Vue节点内容如下:
Graph定义如下:
报错如下:
解决办法
Vue节点必须只存在一个根节点时,删除Node才不报错,即使是注释行也不能存在
Your Example Website or App
1
Steps to Reproduce the Bug or Issue
1
Expected behavior
1
Screenshots or Videos
1
Platform
Additional context
1