Commit 8a44ac33 authored by nick zheng's avatar nick zheng

chore: 图片保持其宽高比展示

parent 242984fe
......@@ -107,7 +107,7 @@ async function handleUploadImage(event: any) {
@mouseenter="isShowImageMask = true"
@mouseleave="isShowImageMask = false"
>
<img :src="uploadImageUrl" class="h-full w-full" />
<img :src="uploadImageUrl" class="h-full w-full object-cover" />
<label
v-show="isShowImageMask"
......
......@@ -28,7 +28,7 @@ const assistantAvatarUrl = computed(() => {
<div class="mb-[20px] last:mb-0">
<div class="flex">
<img
class="h-[36px] w-[36px] rounded-full"
class="h-[36px] w-[36px] flex-shrink-0 rounded-full object-cover"
:src="isAssistant ? assistantAvatarUrl : props.messageItem.avatar"
alt="Avatar"
/>
......
......@@ -33,6 +33,7 @@ const assistantAvatar = personalAppConfigStore.baseInfo.agentAvatar
preview-disabled
:width="32"
:height="32"
object-fit="cover"
class="mr-2 mt-1.5 h-8 w-8 rounded-full"
/>
......
......@@ -19,7 +19,11 @@ function handleSelectFeaturedQuestion(featuredQuestion: string) {
<template>
<div class="flex w-full flex-1 flex-col overflow-auto px-5">
<div class="mb-5 flex w-full justify-center pt-[50px]">
<img v-if="personalAppConfigStore.baseInfo.agentAvatar" :src="agentAvatar" class="h-[72px] w-[72px] rounded-xl" />
<img
v-if="personalAppConfigStore.baseInfo.agentAvatar"
:src="agentAvatar"
class="h-[72px] w-[72px] rounded-xl object-cover"
/>
<div v-else class="h-[72px] w-[72px] rounded-xl border" />
</div>
......
......@@ -47,6 +47,7 @@ const assistantAvatar = computed(() => {
preview-disabled
:width="32"
:height="32"
object-fit="cover"
class="mr-2 mt-1.5 h-8 w-8 rounded-full"
/>
......
......@@ -28,7 +28,7 @@ function handleSelectFeaturedQuestion(featuredQuestion: string) {
<template>
<div class="flex w-full flex-1 flex-col px-5">
<div class="mb-5 mt-[60px] flex w-full justify-center sm:pt-[120px]">
<img :src="agentAvatar" class="h-[72px] w-[72px] rounded-xl" />
<img :src="agentAvatar" class="h-[72px] w-[72px] rounded-xl object-cover" />
</div>
<div class="flex flex-col items-center justify-center">
......
......@@ -49,7 +49,7 @@ function handleToLogin() {
class="hover:text-theme-color mr-5 cursor-pointer outline-none"
@click="handleBack"
/>
<img :src="agentApplicationConfig.baseInfo.agentAvatar" class="mr-5 h-10 w-10 rounded-md" />
<img :src="agentApplicationConfig.baseInfo.agentAvatar" class="mr-5 h-10 w-10 rounded-md object-cover" />
<div class="flex flex-col items-start justify-center">
<span class="mb-1 line-clamp-1 max-w-[200px] break-all">{{ agentApplicationConfig.baseInfo.agentTitle }}</span>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment