From a4ca216c5b215f323b3c439b2f445dad72bbfce1 Mon Sep 17 00:00:00 2001
From: zhangxiao <898441624@qq.com>
Date: 星期一, 26 八月 2024 16:44:31 +0800
Subject: [PATCH] fix: 修改bug

---
 src/components/navbar/index.vue |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/components/navbar/index.vue b/src/components/navbar/index.vue
index 638bc53..ff370a4 100644
--- a/src/components/navbar/index.vue
+++ b/src/components/navbar/index.vue
@@ -150,7 +150,7 @@
             <img alt="avatar" :src="avatar" />
           </a-avatar>
           <template #content>
-            <a-doption>
+            <!-- <a-doption>
               <a-space @click="switchRoles">
                 <icon-tag />
                 <span>
@@ -173,7 +173,7 @@
                   {{ $t('messageBox.userSettings') }}
                 </span>
               </a-space>
-            </a-doption>
+            </a-doption> -->
             <a-doption>
               <a-space @click="handleLogout">
                 <icon-export />
@@ -185,6 +185,7 @@
           </template>
         </a-dropdown>
       </li>
+      <li style="padding: 0"> {{ name }} </li>
     </ul>
   </div>
 </template>
@@ -200,6 +201,7 @@
   import Menu from '@/components/menu/index.vue';
   import MessageBox from '../message-box/index.vue';
   import login from '@/assets/images/icon-logo.png';
+  import { getUserInfo } from '@/utils/auth';
 
   const appStore = useAppStore();
   const userStore = useUserStore();
@@ -208,6 +210,7 @@
   const { isFullscreen, toggle: toggleFullScreen } = useFullscreen();
   const locales = [...LOCALE_OPTIONS];
   const avatar = login;
+  const name = JSON.parse(getUserInfo()).name || '';
   //const avatar = computed(() => {
   //  return userStore.avatar;
   //});

--
Gitblit v1.8.0