From 88f50ddaf545880b7498258dabad119770682ca5 Mon Sep 17 00:00:00 2001
From: 13404089107 <puwei@sinata.cn>
Date: 星期二, 24 六月 2025 10:38:52 +0800
Subject: [PATCH] Merge branch 'main' of http://120.76.84.145:10101/gitblit/r/H5/leshan-laboratory

---
 laboratory/src/layouts/components/HeaderNav.vue |   38 ++++++++++++++++++++++++++++++++------
 1 files changed, 32 insertions(+), 6 deletions(-)

diff --git a/laboratory/src/layouts/components/HeaderNav.vue b/laboratory/src/layouts/components/HeaderNav.vue
index ed316fe..ddc9159 100644
--- a/laboratory/src/layouts/components/HeaderNav.vue
+++ b/laboratory/src/layouts/components/HeaderNav.vue
@@ -2,7 +2,12 @@
   <div>
     <!-- 右侧用户登录图标 -->
     <div class="user-logininfo">
-      <div class="user-logininfo-icon">
+      <div class="logoIcon" v-if="logo">
+        <div class="image">
+          <img src="../../assets/logo.jpg" alt="" srcset="" />
+        </div>
+      </div>
+      <div class="user-logininfo-icon" v-else>
         <!-- 折叠 -->
         <i @click="clickFold" class="el-icon-s-fold"></i>
         <!-- 标签列表 -->
@@ -17,7 +22,7 @@
       </div>
       <div class="user-info">
         <img src="@/assets/public/photo.png" />
-        <div class="user-info-text">欢迎您,admin</div>
+        <div class="user-info-text">欢迎您,{{ userInfo.nickName }}</div>
         <div class="user-info-line"></div>
         <div @click="outLogin" class="user-info-out">
           <img src="@/assets/public/logOut.png" />
@@ -37,6 +42,12 @@
       scrollTimer: null,
       scrollAmount: 0
     }
+  },
+  props: {
+    logo: {
+      type: String,
+      default: ''
+    },
   },
   computed: {
     ...mapState(['tagList', 'isFold'])
@@ -73,23 +84,26 @@
     },
     // 跳转标签
     goTag(tag) {
-      this.$router.push(tag.path)
+      this.$router.push({
+        path: tag.path,
+        query: tag.query
+      })
     },
     handleWheel(e) {
       if (this.scrollTimer) {
         this.scrollAmount += e.deltaY;
         return;
       }
-      
+
       const container = e.currentTarget;
       this.scrollAmount = e.deltaY;
-      
+
       const scroll = () => {
         container.scrollLeft += this.scrollAmount * 1.2; // 增加滚动速度
         this.scrollAmount = 0;
         this.scrollTimer = null;
       };
-      
+
       this.scrollTimer = setTimeout(scroll, 8); // 减少延迟时间
     }
   },
@@ -107,6 +121,18 @@
   justify-content: space-between;
   overflow: hidden;
 
+  .image {
+    // margin-top: 40px;
+    width: 70px;
+    height: 70px;
+
+    img {
+      width: 100%;
+      height: 100%;
+      border-radius: 50%;
+    }
+  }
+
   .user-logininfo-icon {
     margin-right: 30px;
     flex: 1;

--
Gitblit v1.7.1