Commit 3e88f2f7 authored by nick zheng's avatar nick zheng

Merge branch 'beta' into 'master'

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

See merge request !71
parents 980bb6d7 8a44ac33
...@@ -107,7 +107,7 @@ async function handleUploadImage(event: any) { ...@@ -107,7 +107,7 @@ async function handleUploadImage(event: any) {
@mouseenter="isShowImageMask = true" @mouseenter="isShowImageMask = true"
@mouseleave="isShowImageMask = false" @mouseleave="isShowImageMask = false"
> >
<img :src="uploadImageUrl" class="h-full w-full" /> <img :src="uploadImageUrl" class="h-full w-full object-cover" />
<label <label
v-show="isShowImageMask" v-show="isShowImageMask"
......
...@@ -28,7 +28,7 @@ const assistantAvatarUrl = computed(() => { ...@@ -28,7 +28,7 @@ const assistantAvatarUrl = computed(() => {
<div class="mb-[20px] last:mb-0"> <div class="mb-[20px] last:mb-0">
<div class="flex"> <div class="flex">
<img <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" :src="isAssistant ? assistantAvatarUrl : props.messageItem.avatar"
alt="Avatar" alt="Avatar"
/> />
......
...@@ -33,6 +33,7 @@ const assistantAvatar = personalAppConfigStore.baseInfo.agentAvatar ...@@ -33,6 +33,7 @@ const assistantAvatar = personalAppConfigStore.baseInfo.agentAvatar
preview-disabled preview-disabled
:width="32" :width="32"
:height="32" :height="32"
object-fit="cover"
class="mr-2 mt-1.5 h-8 w-8 rounded-full" class="mr-2 mt-1.5 h-8 w-8 rounded-full"
/> />
......
...@@ -19,7 +19,11 @@ function handleSelectFeaturedQuestion(featuredQuestion: string) { ...@@ -19,7 +19,11 @@ function handleSelectFeaturedQuestion(featuredQuestion: string) {
<template> <template>
<div class="flex w-full flex-1 flex-col overflow-auto px-5"> <div class="flex w-full flex-1 flex-col overflow-auto px-5">
<div class="mb-5 flex w-full justify-center pt-[50px]"> <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 v-else class="h-[72px] w-[72px] rounded-xl border" />
</div> </div>
......
...@@ -47,6 +47,7 @@ const assistantAvatar = computed(() => { ...@@ -47,6 +47,7 @@ const assistantAvatar = computed(() => {
preview-disabled preview-disabled
:width="32" :width="32"
:height="32" :height="32"
object-fit="cover"
class="mr-2 mt-1.5 h-8 w-8 rounded-full" class="mr-2 mt-1.5 h-8 w-8 rounded-full"
/> />
......
...@@ -28,7 +28,7 @@ function handleSelectFeaturedQuestion(featuredQuestion: string) { ...@@ -28,7 +28,7 @@ function handleSelectFeaturedQuestion(featuredQuestion: string) {
<template> <template>
<div class="flex w-full flex-1 flex-col px-5"> <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]"> <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>
<div class="flex flex-col items-center justify-center"> <div class="flex flex-col items-center justify-center">
......
...@@ -49,7 +49,7 @@ function handleToLogin() { ...@@ -49,7 +49,7 @@ function handleToLogin() {
class="hover:text-theme-color mr-5 cursor-pointer outline-none" class="hover:text-theme-color mr-5 cursor-pointer outline-none"
@click="handleBack" @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"> <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> <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