From b8d419772af627538ea2f39a1e849d6b5e932507 Mon Sep 17 00:00:00 2001 From: hanyuxia Date: Mon, 24 Jun 2024 17:24:15 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AE=9E=E4=BD=93=E5=85=B3=E7=B3=BB?= =?UTF-8?q?=E5=9B=BE=E4=BC=98=E5=8C=96=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= =?UTF-8?q?:=E7=82=B9=E5=87=BB=E4=B8=8A=E4=B8=80=E6=AD=A5=E3=80=81?= =?UTF-8?q?=E4=B8=8B=E4=B8=80=E6=AD=A5=E6=93=8D=E4=BD=9C=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E6=B8=85=E9=99=A4=E4=B8=B4=E6=97=B6=E8=8A=82=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/entityExplorer/EntityGraph.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/views/entityExplorer/EntityGraph.vue b/src/views/entityExplorer/EntityGraph.vue index b559ee3a..fc51d421 100644 --- a/src/views/entityExplorer/EntityGraph.vue +++ b/src/views/entityExplorer/EntityGraph.vue @@ -675,7 +675,7 @@ export default { links.splice(linksIndex,1) } }) - + this.cleanTempItems() this.stackData.redo.push(data) if (this.stackData.justRedo) { this.stackData.justRedo = false @@ -687,6 +687,7 @@ export default { if(data) { this.stackData.justRedo = true this.addItems(data.nodes, data.links) + this.cleanTempItems() if (this.stackData.justUndo) { this.stackData.justUndo = false } @@ -944,8 +945,8 @@ export default { } } }, - cleanTempItems (data) { - const { nodes, links } = data ? data : this.graph.graphData() + cleanTempItems () { + const { nodes, links } = this.graph.graphData() const newNodes = nodes.filter(n => n.type !== nodeType.tempNode) const newLinks = links.filter(l => l.type !== linkType.temp) if (newNodes.length !== nodes.length || newLinks.length !== links.length) {