Skip to content

Commit

Permalink
feat: merge code of Avatar
Browse files Browse the repository at this point in the history
  • Loading branch information
baboon-king committed Jul 16, 2024
1 parent fa52f56 commit ba2bb36
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions apps/client/components/user-home/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@
<div class="mt-8 flex w-full justify-between">
<!-- 左侧头像区域 -->
<div class="mr-16 hidden w-72 md:block">
<div class="mx-auto h-56 w-56 overflow-hidden">
<div
class="mx-auto h-56 w-56 overflow-hidden rounded-full border-2 border-gray-300 bg-gray-300 dark:border-gray-700 dark:bg-gray-700"
>
<!-- 通过给定高度来自适应拉伸图片,如果图片不存在或者加载失败则显示外层的背景色(没有宽度) -->
<img
class="h-full w-full rounded-full border-2 border-gray-300 bg-gray-300 object-cover dark:border-gray-700 dark:bg-gray-700"
class="h-full object-cover"
:src="user?.avatar"
/>
</div>
Expand Down

0 comments on commit ba2bb36

Please sign in to comment.