Prepaid graph. The element tree shown above can delete nodes
The process of deleting is roughly to get the child node data through node.parent.data.children through the two received parameters node and data,
and then by traversing (const index = children.findIndex (d = > d.id = data.id)
get the index, of the node and execute children.splice (index, 1), which is exactly the same code but my DOM has not been updated (that is, it has not been deleted). I would like to ask the gods what"s going on. Thank you very much (it is useful to add, that is, delete or not update).