From 9b0ec735301a34bb03dd6d701e70bf25af8a0e86 Mon Sep 17 00:00:00 2001
From: 董国庆 <364620639@qq.com>
Date: 星期三, 28 五月 2025 16:52:42 +0800
Subject: [PATCH] 中台

---
 laboratory/src/layouts/components/HeaderNav.vue |   39 +++++++++++++++++++++++++++++++--------
 1 files changed, 31 insertions(+), 8 deletions(-)

diff --git a/laboratory/src/layouts/components/HeaderNav.vue b/laboratory/src/layouts/components/HeaderNav.vue
index 6b10bb0..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>
         <!-- 标签列表 -->
@@ -37,6 +42,12 @@
       scrollTimer: null,
       scrollAmount: 0
     }
+  },
+  props: {
+    logo: {
+      type: String,
+      default: ''
+    },
   },
   computed: {
     ...mapState(['tagList', 'isFold'])
@@ -73,26 +84,26 @@
     },
     // 跳转标签
     goTag(tag) {
-        this.$router.push({
-            path: tag.path,
-            query: tag.query
-        })
+      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); // 减少延迟时间
     }
   },
@@ -110,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