| | |
| | | userAvatar, |
| | | avatarsStyle, |
| | | userRoles, |
| | | userRolesList, |
| | | changRole, |
| | | toggleSideBar |
| | | } = useNav(); |
| | | </script> |
| | |
| | | <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> |