From 6e9c4be2f26243b19ece5df87c8e62c1ed113301 Mon Sep 17 00:00:00 2001 From: hanyuqing <1106611654@qq.com> Date: Thu, 15 Jan 2026 11:30:09 +0800 Subject: [PATCH] all --- vue/src/system/GraphDemo.vue | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/vue/src/system/GraphDemo.vue b/vue/src/system/GraphDemo.vue index fe1b291..d7be885 100644 --- a/vue/src/system/GraphDemo.vue +++ b/vue/src/system/GraphDemo.vue @@ -864,10 +864,10 @@ export default { // 比如如果你有高亮定时器,这里 clearTimeout }, formatData(data) { + if (!this._graph) return; this._graph.stopLayout(); this.clearGraphState(); - // === 1. 构建 nodeId → label 映射 === const nodeIdToEnLabel = {}; data.nodes.forEach(node => { @@ -922,7 +922,6 @@ export default { nodes: updatedNodes, edges: updatedEdges }; - this.buildNodeLabelMap(updatedNodes); this.updateGraph(updatedData) this.buildCategoryIndex(); @@ -1195,7 +1194,7 @@ export default { console.log(e) const edge = items[0]; // 当前悬停的边 if (!edge) return ''; - const data=items[0].data + const data = items[0].data const sourceId = edge.source; const targetId = edge.target;