From 86be3bd87c56cbc82e295cb41542601a0ed55330 Mon Sep 17 00:00:00 2001
From: 杨磊 <505174330@qq.com>
Date: 星期三, 09 四月 2025 16:22:20 +0800
Subject: [PATCH] 树节点自定义颜色

---
 src/views/directory/index.vue |   21 +++++++++++----------
 1 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/src/views/directory/index.vue b/src/views/directory/index.vue
index b94eafc..be35e5f 100644
--- a/src/views/directory/index.vue
+++ b/src/views/directory/index.vue
@@ -461,37 +461,38 @@
           {
             type: "tree",
             data: [this.chartData],
-            // symbol: "emptyCircle",
             top: "10%",
             bottom: "10%",
             layout: "radial",
-            symbol: "emptyCircle",
+            symbol: "circle",
             symbolSize: 7,
             initialTreeDepth: 3, // 灞曞紑鎵�鏈夎妭鐐�
             animationDurationUpdate: 750,
             emphasis: {
               focus: "descendant",
             },
+
             label: {
               position: "top", //鏍囩鐨勪綅缃��
               verticalAlign: "middle", //鏂囧瓧鍨傜洿瀵归綈鏂瑰紡锛岄粯璁よ嚜鍔ㄣ��
               fontSize: 12, //鏂囧瓧鐨勫瓧浣撳ぇ灏�
               color: "#bc1c00",
             },
-            leaves: {
-              symbol: "emptyCircle",
-              label: {
-                fontSize: 12,
-              },
-            },
+            // leaves: {
+            //   symbol: "emptyCircle",
+            //   label: {
+            //     fontSize: 12,
+            //   },
+            // },
             expandAndCollapse: false,
             lineStyle: {
               color: "#bc1c00",
               width: 1,
             },
             itemStyle: {
-              symbol: "emptyCircle",
-              color: "#bc1c00",
+              color: function (params) {
+                return "green";
+              },
             },
             roam: true,
             center: ["5%", "0%"], // 寰皟鍨傜洿灞呬腑

--
Gitblit v1.9.1