fix(history): 桌面端媒体整理表格显示海报缩略图 (#665)

桌面端分组模式与列表模式的标题列此前硬编码类型图标,从不展示真实海报。
现复用移动端卡片已有的 getHistoryPosterUrl helper 渲染海报缩略图,
海报加载失败时通过 VImg 的 error 插槽回退到原有的类型图标结构。
This commit is contained in:
LS
2026-08-11 19:48:36 +08:00
committed by GitHub
parent 3631cd1f22
commit 8e88a1ba15

View File

@@ -1492,7 +1492,22 @@ onUnmounted(() => {
</template>
<template #item.title="{ item }">
<div class="d-flex align-center">
<VAvatar>
<VImg
v-if="getHistoryPosterUrl(item)"
:src="getHistoryPosterUrl(item)"
:alt="item.title"
cover
width="44"
height="66"
class="rounded-sm flex-shrink-0"
>
<template #error>
<VAvatar>
<VIcon :icon="getIcon(item.type || '')" />
</VAvatar>
</template>
</VImg>
<VAvatar v-else>
<VIcon :icon="getIcon(item.type || '')" />
</VAvatar>
<div class="d-flex flex-column ms-1">
@@ -1576,7 +1591,22 @@ onUnmounted(() => {
>
<template #item.title="{ item }">
<div class="d-flex align-center">
<VAvatar>
<VImg
v-if="getHistoryPosterUrl(item)"
:src="getHistoryPosterUrl(item)"
:alt="item.title"
cover
width="44"
height="66"
class="rounded-sm flex-shrink-0"
>
<template #error>
<VAvatar>
<VIcon :icon="getIcon(item.type || '')" />
</VAvatar>
</template>
</VImg>
<VAvatar v-else>
<VIcon :icon="getIcon(item.type || '')" />
</VAvatar>
<div class="d-flex flex-column ms-1">