X6 icon indicating copy to clipboard operation
X6 copied to clipboard

关于vue组件作为node节点,使用graph.removeNode报错nextSibling为null

Open TyCoding opened this issue 1 year ago • 4 comments

Describe the bug

这个Bug是不是很早之前就有了?

现象:

自定义Vue节点内容如下: image

Graph定义如下:

graph.on('node:click', ({ node }) => {
    graph.removeNode(node)
  });

报错如下: image

解决办法

Vue节点必须只存在一个根节点时,删除Node才不报错,即使是注释行也不能存在 image

Your Example Website or App

1

Steps to Reproduce the Bug or Issue

1

Expected behavior

1

Screenshots or Videos

1

Platform

  • OS: [e.g. macOS, Windows, Linux]
  • Browser: [e.g. Chrome, Safari, Firefox]
  • Version: [e.g. 2.11.1] 最新版

Additional context

1

TyCoding avatar Sep 21 '23 07:09 TyCoding