From bb576469eb1e2cb2bf8e1717902702ca28f5ef65 Mon Sep 17 00:00:00 2001
From: zhangwei <1504152376@qq.com>
Date: 星期一, 28 七月 2025 17:20:56 +0800
Subject: [PATCH] '-'

---
 src/layout/components/lay-navbar/index.vue |   18 +++++++++++++++---
 1 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/src/layout/components/lay-navbar/index.vue b/src/layout/components/lay-navbar/index.vue
index b9df6c4..8a966e4 100644
--- a/src/layout/components/lay-navbar/index.vue
+++ b/src/layout/components/lay-navbar/index.vue
@@ -6,6 +6,7 @@
 import LaySidebarFullScreen from "../lay-sidebar/components/SidebarFullScreen.vue";
 import LaySidebarBreadCrumb from "../lay-sidebar/components/SidebarBreadCrumb.vue";
 import LaySidebarTopCollapse from "../lay-sidebar/components/SidebarTopCollapse.vue";
+import { CaretBottom } from "@element-plus/icons-vue";
 
 import LogoutCircleRLine from "~icons/ri/logout-circle-r-line";
 import Setting from "~icons/ri/settings-3-line";
@@ -20,6 +21,8 @@
   userAvatar,
   avatarsStyle,
   userRoles,
+  userRolesList,
+  changRole,
   toggleSideBar
 } = useNav();
 </script>
@@ -52,17 +55,25 @@
         <span class="el-dropdown-link navbar-bg-hover select-none">
           <!-- <img :src="userAvatar" :style="avatarsStyle" /> -->
           <p class="dark:text-white">
-            {{ username || "璇峰畬鍠勮祫鏂�" }}
+            浣犲ソ锛寋{ username || "璇峰畬鍠勮祫鏂�" }}
             <el-tag effect="plain">{{ userRoles.name }}</el-tag>
           </p>
+          <el-icon><CaretBottom /></el-icon>
         </span>
         <template #dropdown>
           <el-dropdown-menu class="logout">
+            <el-dropdown-item
+              v-for="item in userRolesList"
+              :key="item.code"
+              @click="changRole(item)"
+            >
+              {{ item.name }}
+            </el-dropdown-item>
             <el-dropdown-item @click="logout">
-              <IconifyIconOffline
+              <!-- <IconifyIconOffline
                 :icon="LogoutCircleRLine"
                 style="margin: 5px"
-              />
+              /> -->
               閫�鍑虹郴缁�
             </el-dropdown-item>
           </el-dropdown-menu>
@@ -106,6 +117,7 @@
       justify-content: space-around;
       height: 48px;
       padding: 10px;
+      margin-right: 10px;
       color: #000000d9;
       cursor: pointer;
 

--
Gitblit v1.9.1