|
12 | 12 |
|
13 | 13 | <template #dropdown> |
14 | 14 | <el-dropdown-menu class="avatar-dropdown"> |
15 | | - <div class="userInfo"> |
16 | | - <p class="bold mb-4" style="font-size: 14px">{{ user.userInfo?.username }}</p> |
17 | | - <p> |
18 | | - <el-text type="info"> |
19 | | - {{ user.userInfo?.email }} |
20 | | - </el-text> |
21 | | - </p> |
| 15 | + <div class="userInfo flex align-center"> |
| 16 | + <div class="mr-12 flex align-center"> |
| 17 | + <el-avatar :size="30"> |
| 18 | + <img src="@/assets/user-icon.svg" style="width: 54%" alt="" /> |
| 19 | + </el-avatar> |
| 20 | + </div> |
| 21 | + <div style="width: 90%"> |
| 22 | + <p class="bold mb-4" style="font-size: 14px">{{ user.userInfo?.username }}</p> |
| 23 | + <template |
| 24 | + v-for="item in user.userInfo?.role" |
| 25 | + v-if="user.userInfo?.role && user.userInfo.role.length > 0" |
| 26 | + > |
| 27 | + <el-tag size="small" class="default-tag">{{ user.userInfo?.role[0] }}</el-tag> |
| 28 | + <el-tag size="small" class="default-tag ml-4" v-if="user.userInfo?.role?.length > 1" |
| 29 | + >+{{ user.userInfo?.role?.length - 1 }}</el-tag |
| 30 | + > |
| 31 | + </template> |
| 32 | + </div> |
22 | 33 | </div> |
23 | 34 | <el-dropdown-item class="border-t p-8" @click="openResetPassword"> |
24 | 35 | {{ $t('views.login.resetPassword') }} |
25 | 36 | </el-dropdown-item> |
26 | 37 | <div v-hasPermission="new ComplexPermission([], ['x-pack'], 'OR')"> |
27 | | - <el-dropdown-item class="border-t p-8" @click="openAPIKeyDialog"> |
| 38 | + <el-dropdown-item class="p-8" @click="openAPIKeyDialog"> |
28 | 39 | {{ $t('layout.apiKey') }} |
29 | 40 | </el-dropdown-item> |
30 | 41 | </div> |
31 | | - <el-dropdown-item class="border-t" style="padding: 0" @click.stop> |
| 42 | + <el-dropdown-item style="padding: 0" @click.stop> |
32 | 43 | <el-dropdown class="w-full" trigger="hover" placement="left-start"> |
33 | 44 | <div class="flex-between w-full" style="line-height: 22px; padding: 12px 11px"> |
34 | 45 | <span> {{ $t('layout.language') }}</span> |
|
59 | 70 | </template> |
60 | 71 | </el-dropdown> |
61 | 72 | </el-dropdown-item> |
62 | | - <el-dropdown-item class="border-t" @click="openAbout"> |
| 73 | + <el-dropdown-item @click="openAbout"> |
63 | 74 | {{ $t('layout.about.title') }} |
64 | 75 | </el-dropdown-item> |
65 | 76 |
|
| 77 | + <el-dropdown-item @click="router.push({ path: `/system/user` })"> |
| 78 | + <div class="flex-between w-full"> |
| 79 | + {{ $t('views.system.title') }} |
| 80 | + <AppIcon iconName="app-go"></AppIcon> |
| 81 | + </div> |
| 82 | + </el-dropdown-item> |
| 83 | + |
66 | 84 | <el-dropdown-item class="border-t" @click="logout"> |
67 | 85 | {{ $t('layout.logout') }} |
68 | 86 | </el-dropdown-item> |
|
0 commit comments