From ea34a957f0954d5f43aae9e9ae619741b208b2f9 Mon Sep 17 00:00:00 2001
From: pany <939630029@qq.com>
Date: Tue, 10 Dec 2024 19:20:32 +0800
Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=20NavigationBar=20CS?=
 =?UTF-8?q?S?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/common/components/Notify/index.vue        |  4 ---
 .../components/NavigationBar/index.vue        | 29 ++++++++++---------
 2 files changed, 16 insertions(+), 17 deletions(-)

diff --git a/src/common/components/Notify/index.vue b/src/common/components/Notify/index.vue
index d156af4..6d7e3a5 100644
--- a/src/common/components/Notify/index.vue
+++ b/src/common/components/Notify/index.vue
@@ -86,10 +86,6 @@ function handleHistory() {
 </template>
 
 <style lang="scss" scoped>
-.notify {
-  margin-right: 10px;
-}
-
 .notify-history {
   text-align: center;
   padding-top: 12px;
diff --git a/src/layouts/components/NavigationBar/index.vue b/src/layouts/components/NavigationBar/index.vue
index aea516e..a61ea8b 100644
--- a/src/layouts/components/NavigationBar/index.vue
+++ b/src/layouts/components/NavigationBar/index.vue
@@ -46,8 +46,8 @@ function logout() {
       <Screenfull v-if="showScreenfull" class="right-menu-item" />
       <ThemeSwitch v-if="showThemeSwitch" class="right-menu-item" />
       <Notify v-if="showNotify" class="right-menu-item" />
-      <el-dropdown class="right-menu-item">
-        <div class="right-menu-avatar">
+      <el-dropdown>
+        <div class="right-menu-item user">
           <el-avatar :icon="UserFilled" :size="30" />
           <span>{{ userStore.username }}</span>
         </div>
@@ -110,18 +110,21 @@ function logout() {
     height: 100%;
     display: flex;
     align-items: center;
-    .right-menu-item {
-      padding: 0 10px;
+    &-item {
+      margin: 0 10px;
       cursor: pointer;
-      .right-menu-avatar {
-        display: flex;
-        align-items: center;
-        .el-avatar {
-          margin-right: 10px;
-        }
-        span {
-          font-size: 16px;
-        }
+      &:last-child {
+        margin-left: 20px;
+      }
+    }
+    .user {
+      display: flex;
+      align-items: center;
+      .el-avatar {
+        margin-right: 10px;
+      }
+      span {
+        font-size: 16px;
       }
     }
   }