Commit 81595922 authored by nick zheng's avatar nick zheng

Merge branch 'beta' into 'master'

fix: 数字人对话上传背景显示完整名称

See merge request !9
parents d0a98947 84be0601
...@@ -71,7 +71,7 @@ async function handleSearchImageList(searchNameValue: string) { ...@@ -71,7 +71,7 @@ async function handleSearchImageList(searchNameValue: string) {
async function uploadImage(event: any) { async function uploadImage(event: any) {
const e = window.event || event const e = window.event || event
const file = e.target.files[0] const file = e.target.files[0]
const fileName = file.name.substring(0, file.name.lastIndexOf('.')) const fileName = file.name
const maxImageSize = 1024 * 1024 * 3 const maxImageSize = 1024 * 1024 * 3
if (!['png', 'jpg', 'jpeg'].includes(file.type.split('/')[1])) { if (!['png', 'jpg', 'jpeg'].includes(file.type.split('/')[1])) {
...@@ -181,11 +181,16 @@ function handleUpdateBackgroundImageType(backgroundImageType: string) { ...@@ -181,11 +181,16 @@ function handleUpdateBackgroundImageType(backgroundImageType: string) {
@click="handleClickImage(image)" @click="handleClickImage(image)"
> >
<img class="h-full w-full object-contain" :src="image.imageUrl" @load="onImageLoaded(index)" /> <img class="h-full w-full object-contain" :src="image.imageUrl" @load="onImageLoaded(index)" />
<div <NPopover trigger="hover" placement="bottom">
class="absolute bottom-0 line-clamp-1 h-5 w-full break-all bg-gradient-to-t from-gray-600 px-1 text-xs leading-5 text-white" <template #trigger>
> <div
{{ image.imageName }} class="absolute bottom-0 line-clamp-1 h-5 w-full break-all bg-gradient-to-t from-gray-600 px-1 text-xs leading-5 text-white"
</div> >
{{ image.imageName }}
</div>
</template>
<span class="text-xs">{{ image.imageName }}</span>
</NPopover>
<div <div
class="absolute right-1 top-1 hidden h-7 w-7 cursor-pointer items-center justify-center rounded-md bg-black/40 p-1 group-hover:flex" class="absolute right-1 top-1 hidden h-7 w-7 cursor-pointer items-center justify-center rounded-md bg-black/40 p-1 group-hover:flex"
@click.stop="handleDelete(image.id!)" @click.stop="handleDelete(image.id!)"
...@@ -214,11 +219,17 @@ function handleUpdateBackgroundImageType(backgroundImageType: string) { ...@@ -214,11 +219,17 @@ function handleUpdateBackgroundImageType(backgroundImageType: string) {
@click="handleClickImage(image)" @click="handleClickImage(image)"
> >
<img class="h-full w-full object-contain" :src="image.imageUrl" @load="onImageLoaded(index)" /> <img class="h-full w-full object-contain" :src="image.imageUrl" @load="onImageLoaded(index)" />
<div <NPopover trigger="hover" placement="bottom">
class="absolute bottom-0 line-clamp-1 h-5 w-full break-all bg-gradient-to-t from-gray-600 px-1 text-xs leading-5 text-white" <template #trigger>
> <div
{{ image.imageName }} class="absolute bottom-0 line-clamp-1 h-5 w-full break-all bg-gradient-to-t from-gray-600 px-1 text-xs leading-5 text-white"
</div> >
{{ image.imageName }}
</div>
</template>
<span class="text-xs">{{ image.imageName }}</span>
</NPopover>
<CustomIcon <CustomIcon
v-if="currentBackgroundUrl === image.imageUrl" v-if="currentBackgroundUrl === image.imageUrl"
icon="si-glyph:checked" icon="si-glyph:checked"
......
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