Commit daef5282 authored by shirlyn.guo's avatar shirlyn.guo 🤡

chore: 添加最近创作的空内容&账号显示完整名称

parent b5ce1409
...@@ -130,7 +130,14 @@ async function handleCreateDigitalHumanVideo(digitalHumanVideoForm: DigitalHuman ...@@ -130,7 +130,14 @@ async function handleCreateDigitalHumanVideo(digitalHumanVideoForm: DigitalHuman
" "
/> />
<div class="ml-[10px] flex-1 truncate text-[18px]">{{ userInfo.nickName || '-' }}</div> <div class="ml-[10px] flex-1 truncate text-[18px]">
<n-popover trigger="hover">
<template #trigger>
{{ userInfo.nickName || '-' }}
</template>
<span>{{ userInfo.nickName || '-' }}</span>
</n-popover>
</div>
</div> </div>
<div class="flex items-center"> <div class="flex items-center">
......
...@@ -50,7 +50,6 @@ function getRecentCreationList() { ...@@ -50,7 +50,6 @@ function getRecentCreationList() {
width: item.width, width: item.width,
height: item.height, height: item.height,
})) }))
fetchCreationTemplateInfoListLoading.value = false fetchCreationTemplateInfoListLoading.value = false
}) })
} }
...@@ -95,43 +94,48 @@ function handleToCreation(draftId: number) { ...@@ -95,43 +94,48 @@ function handleToCreation(draftId: number) {
<n-scrollbar :x-scrollable="true"> <n-scrollbar :x-scrollable="true">
<div class="min-h-[194px]"> <div class="min-h-[194px]">
<template v-if="!fetchCreationTemplateInfoListLoading"> <template v-if="!fetchCreationTemplateInfoListLoading">
<div <div>
v-for="templateInfoItem in creationTemplateInfoList"
:key="templateInfoItem.id"
class="mr-[10px] inline-block pb-[16px]"
>
<div <div
class="relative mb-[12px] flex h-[145px] w-[145px] cursor-pointer items-center justify-center overflow-hidden rounded-[12px] bg-[#f3f4fb]" v-for="templateInfoItem in creationTemplateInfoList"
@click="handleToCreation(templateInfoItem.id)" :key="templateInfoItem.id"
class="mr-[10px] inline-block pb-[16px]"
> >
<img
class="z-1 relative object-cover transition-[scale] duration-300 ease-in-out hover:scale-110"
:class="
templateInfoItem.pageLayout === ScreenType.LANDSCAPE ||
templateInfoItem.width > templateInfoItem.height
? 'aspect-[16/9]'
: 'aspect-[9/16] h-full'
"
:src="templateInfoItem.coverUrl"
alt="cover"
/>
<img
class="absolute left-0 top-0 h-full w-full object-cover blur-[32px]"
:src="templateInfoItem.coverUrl"
alt="cover"
/>
<div <div
class="absolute bottom-[8px] left-[8px] z-10 rounded-[4px] bg-[rgba(0,0,0,.5)] px-[6px] py-[2px] text-[12px] text-[#fff]" class="relative mb-[12px] flex h-[145px] w-[145px] cursor-pointer items-center justify-center overflow-hidden rounded-[12px] bg-[#f3f4fb]"
@click="handleToCreation(templateInfoItem.id)"
> >
{{ creationTypeFormatter(templateInfoItem.taskType) }} <img
class="z-1 relative object-cover transition-[scale] duration-300 ease-in-out hover:scale-110"
:class="
templateInfoItem.pageLayout === ScreenType.LANDSCAPE ||
templateInfoItem.width > templateInfoItem.height
? 'aspect-[16/9]'
: 'aspect-[9/16] h-full'
"
:src="templateInfoItem.coverUrl"
alt="cover"
/>
<img
class="absolute left-0 top-0 h-full w-full object-cover blur-[32px]"
:src="templateInfoItem.coverUrl"
alt="cover"
/>
<div
class="absolute bottom-[8px] left-[8px] z-10 rounded-[4px] bg-[rgba(0,0,0,.5)] px-[6px] py-[2px] text-[12px] text-[#fff]"
>
{{ creationTypeFormatter(templateInfoItem.taskType) }}
</div>
</div> </div>
</div>
<n-ellipsis class="!max-w-[150px] cursor-default text-[#151b26]"> <n-ellipsis class="!max-w-[150px] cursor-default text-[#151b26]">
{{ templateInfoItem.draftName }} {{ formatDateTime(templateInfoItem.modifiedTime) }} {{ templateInfoItem.draftName }} {{ formatDateTime(templateInfoItem.modifiedTime) }}
</n-ellipsis> </n-ellipsis>
</div>
</div>
<div v-show="!creationTemplateInfoList.length" class="pt-[40px]">
<n-empty description="暫無創作數據"> </n-empty>
</div> </div>
</template> </template>
......
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