Commit 37546bd0 authored by Dazzle Wu's avatar Dazzle Wu

fix: 最近创作封面图比例

parent 4eaad353
......@@ -14,6 +14,8 @@ interface CreationTemplateInfoItem {
modifiedTime: string
draftName: string
pageLayout: ScreenType
width: number
height: number
}
const router = useRouter()
......@@ -45,6 +47,8 @@ function getRecentCreationList() {
coverUrl: item.coverUrl,
taskType: item.taskType,
pageLayout: item.pageLayout,
width: item.width,
height: item.height,
}))
fetchCreationTemplateInfoListLoading.value = false
......@@ -103,7 +107,10 @@ function handleToCreation(draftId: number) {
<img
class="z-1 relative object-cover transition-[scale] duration-300 ease-in-out hover:scale-110"
:class="
templateInfoItem.pageLayout === ScreenType.LANDSCAPE ? 'aspect-[16/9]' : 'aspect-[9/16] h-full'
templateInfoItem.pageLayout === ScreenType.LANDSCAPE ||
templateInfoItem.width > templateInfoItem.height
? 'aspect-[16/9]'
: 'aspect-[9/16] h-full'
"
:src="templateInfoItem.coverUrl"
alt="cover"
......
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