fix(mock): 🐛 修复 首页头像压缩展示、导航栏头像压缩展示

This commit is contained in:
white
2025-12-04 12:29:45 +08:00
parent d3f34c2789
commit 39912dfa88
2 changed files with 14 additions and 5 deletions

View File

@@ -32,7 +32,13 @@
<div class="navbar-actions__item">
<el-dropdown trigger="click">
<div class="user-profile">
<img class="user-profile__avatar" :src="userStore.userInfo.avatar" />
<div style="width: 28px; height: 28px; overflow: hidden; border-radius: 50%">
<img
:src="userStore.userInfo.avatar"
class="user-profile__avatar"
style="width: 100%; height: 100%; object-fit: cover; object-position: center"
/>
</div>
<span class="user-profile__name">{{ userStore.userInfo.username }}</span>
</div>
<template #dropdown>

View File

@@ -7,10 +7,13 @@
<div class="flex flex-wrap">
<!-- 左侧问候语区域 -->
<div class="flex-1 flex items-start">
<img
class="w80px h80px rounded-full"
:src="userStore.userInfo.avatar + '?imageView2/1/w/80/h/80'"
/>
<div style="width: 80px; height: 80px; overflow: hidden; border-radius: 50%">
<img
:src="userStore.userInfo.avatar + '?imageView2/1/w/80/h/80'"
class="w80px h80px rounded-full"
style="width: 100%; height: 100%; object-fit: cover; object-position: center"
/>
</div>
<div class="ml-5">
<p>{{ greetings }}</p>
<p class="text-sm text-gray">今日天气晴朗气温在15至25之间东南风</p>