From f90c94f20b5f11d3b3ce0164d619c0112d5158c9 Mon Sep 17 00:00:00 2001 From: Mila <Mila@pollex.com.tw> Date: 星期四, 20 一月 2022 18:23:56 +0800 Subject: [PATCH] update: TODO#133100 顧問端:header增加顧問頭像圖示 --- PAMapp/components/NavBar.vue | 41 +++++++++++++++++++++++++++++++++-------- 1 files changed, 33 insertions(+), 8 deletions(-) diff --git a/PAMapp/components/NavBar.vue b/PAMapp/components/NavBar.vue index cebd526..3754bfb 100644 --- a/PAMapp/components/NavBar.vue +++ b/PAMapp/components/NavBar.vue @@ -16,11 +16,20 @@ ref="dropdown" trigger="click" @command="routerNavigateTo"> - <i - class="icon-avatar text--dark-blue cursor--pointer fix-chrome-click--issue" + <div @click="isOpenDropdown =!isOpenDropdown" - @blur="isOpenDropdown =false" - ></i> + @blur="isOpenDropdown =false"> + <template v-if="isAdminLogin"> + <UiAvatar + :size="30" + :agentNo="consultantId" + class="admin-avatar" + ></UiAvatar> + </template> + <template v-else> + <i class="icon-avatar text--dark-blue cursor--pointer fix-chrome-click--issue"></i> + </template> + </div> <el-dropdown-menu class="pam-header__dropdown"> <template v-for="(item,index) in navBarList"> @@ -48,11 +57,20 @@ @Component export default class NavBar extends Vue { - @roleStorage.Getter idToken!: string | null; - @roleStorage.Getter currentRole!: string | null; - @roleStorage.Getter consultantId!: string | null; + @roleStorage.Getter + idToken!: string | null; - @roleStorage.Mutation storageClear!: () => void; + @roleStorage.Getter + currentRole!: string | null; + + @roleStorage.Getter + consultantId!: string | null; + + @roleStorage.Mutation + storageClear!: () => void; + + @roleStorage.Getter + isAdminLogin!: boolean; isOpenDropdown = false; @@ -196,6 +214,13 @@ padding: 0px 10px; } } + + .admin-avatar { + margin: 0px 15px; + @media screen and (max-width: 352px) { + margin: 0px 10px; + } + } } } -- Gitblit v1.8.0