We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 62154a2 commit b57d53fCopy full SHA for b57d53f
1 file changed
src/pages/doc/knowledge/KnowledgeNetworkChart.vue
@@ -224,11 +224,15 @@ export default defineComponent({
224
});
225
226
// 定义特殊类别(当前节点和上下游节点)
227
+ // 取当前节点的实际颜色
228
+ const currentNodeData = nodes.find((n: any) => n.name === this.doc);
229
+ const currentNodeColor = currentNodeData?.itemStyle?.color || '#000000';
230
+
231
const specialCategories = [
232
{
233
name: "当前",
234
itemStyle: {
- color: "#F56C6C",
235
+ color: currentNodeColor,
236
opacity: this.isDark ? 0.9 : 1
237
},
238
@@ -239,7 +243,7 @@ export default defineComponent({
239
243
const legendData = [
240
244
{ name: "当前", icon: "roundRect",
241
245
242
246
247
248
249
textStyle: { color: this.isDark ? '#eee' : '#555' }},
0 commit comments