| | |
| | | </template> |
| | | <div class="avatar-container"> |
| | | <el-dropdown @command="handleCommand" class="right-menu-item hover-effect" trigger="click"> |
| | | <div class="avatar-wrapper"> |
| | | <div class="avatar-wrapper" style="display: flex;align-items: center"> |
| | | <!-- <img :src="userStore.avatar" class="user-avatar" />--> |
| | | <img src="../../assets/images/avator.png" class="user-avatar" /> |
| | | <img src="../../assets/images/avator.png" class="user-avatar" /> |
| | | <span>{{userName}}</span> |
| | | <el-icon><caret-bottom /></el-icon> |
| | | </div> |
| | | <template #dropdown> |
| | |
| | | const regRef = ref(null) |
| | | const superRef = ref(); |
| | | const userInfo = ref(); |
| | | const userName = ref('') |
| | | onMounted(()=>{ |
| | | if(getToken()){ |
| | | userInfo.value = JSON.parse(Cookies.get('userInfo')) |
| | | userName.value = userInfo.value.username |
| | | console.log("userInfo",userInfo.value ) |
| | | } |
| | | // getState(); |
| | |
| | | height: 100%; |
| | | line-height: 50px; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | &:focus { |
| | | outline: none; |
| | |
| | | margin-right: 40px; |
| | | |
| | | .avatar-wrapper { |
| | | margin-top: 5px; |
| | | margin-top: 15px; |
| | | position: relative; |
| | | |
| | | .user-avatar { |
| | |
| | | width: 40px; |
| | | height: 40px; |
| | | border-radius: 10px; |
| | | margin-right: 15px; |
| | | } |
| | | |
| | | i { |
| | | cursor: pointer; |
| | | position: absolute; |
| | | right: -20px; |
| | | top: 25px; |
| | | font-size: 12px; |
| | | } |
| | | } |