From 295eb3cc87aaa5176d64a4ef985cdad0bfefae9a Mon Sep 17 00:00:00 2001
From: chenyao <1219716595@qq.com>
Date: Mon, 31 Mar 2025 08:35:00 +0800
Subject: [PATCH] 增加单个机巢页面

---
 src/layout/Header.vue |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/layout/Header.vue b/src/layout/Header.vue
index 43ba79e..5d4ee4b 100644
--- a/src/layout/Header.vue
+++ b/src/layout/Header.vue
@@ -53,14 +53,13 @@
   if (!['首页', '任务管理'].includes(name)) return ElMessage.warning('正在开发中');
   // 更新 leftList 的 active 状态
   leftList.value.forEach(item => {
-    item.active = item.router === path;
+    item.active = item.path === path;
   });
 
   // 更新 rightList 的 active 状态
   rightList.value.forEach(item => {
-    item.active = item.router === path;
+    item.active = item.path === path;
   });
-  console.log(path);
   // 跳转到指定页面
   router.push(path);
 };
@@ -69,12 +68,12 @@
   // 初始化 leftList 的 active 状态
   const currentPath = route.path;
   leftList.value.forEach(item => {
-    item.active = item.router === currentPath;
+    item.active = item.path === currentPath;
   });
 
   // 初始化 rightList 的 active 状态
   rightList.value.forEach(item => {
-    item.active = item.router === currentPath;
+    item.active = item.path === currentPath;
   });
 });
 </script>
@@ -83,7 +82,7 @@
 .header {
   width: calc(100% - 57px - 59px);
   margin-left: 57px;
-  padding-top: 38px;
+  padding-top: 30px;
   display: flex;
   justify-content: space-between;
   // position: relative;

--
Gitblit v1.9.3