diff --git a/vue/src/system/GraphDemo.vue b/vue/src/system/GraphDemo.vue index eb0c6c4..824a6ed 100644 --- a/vue/src/system/GraphDemo.vue +++ b/vue/src/system/GraphDemo.vue @@ -597,13 +597,13 @@ export default { labelText: (d) => d.data.relationship.properties.label, stroke: (d) => { // 获取 target 节点的 label - const targetLabel = this._nodeLabelMap.get(d.target); // d.target 是目标节点 ID + const targetLabel = this._nodeLabelMap.get(d.source); // d.target 是目标节点 ID // 根据 target 节点类型返回对应浅色 if (targetLabel === 'Disease') return 'rgba(239,68,68,0.5)'; if (targetLabel === 'Drug') return 'rgba(145,204,117,0.5)'; if (targetLabel === 'Symptom') return 'rgba(250,200,88,0.5)'; - if (targetLabel === 'Check') return 'rgba(89,209,212,0.5)'; // 橙 - return 'rgba(51,110,238,0.5)'; // default + if (targetLabel === 'Check') return 'rgba(51,110,238,0.5)'; // 橙 + return 'rgba(89,209,212,0.5)'; // default }, // labelFill: (d) => { // // 获取 target 节点的 label