From 3a0705692a82701071c691c6cf98a684b0cd75de Mon Sep 17 00:00:00 2001 From: zhaichao Date: Fri, 30 Oct 2026 11:25:30 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=86=E8=97=8F=E8=BD=AE=E6=92=AD=E5=9B=BE?= =?UTF-8?q?=E6=9C=89=E5=B0=81=E9=9D=A2=E4=BC=98=E5=85=88=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E5=B0=81=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/Dashboard.vue | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/frontend/src/views/Dashboard.vue b/frontend/src/views/Dashboard.vue index 3c9c4c7..602e35f 100644 --- a/frontend/src/views/Dashboard.vue +++ b/frontend/src/views/Dashboard.vue @@ -65,6 +65,11 @@ function sourceOf(it: SpecialRecommendItem) { return (it.sourceLibrary || '').trim() } +/** 是否有封面图:有则书架展示封面,无则展示书脊效果 */ +function hasCover(it: SpecialRecommendItem) { + return !!(it.coverUrl && it.coverUrl.trim()) +} + /* 拉取特藏列表,为每本书随机分配姿态与呼吸延迟,使节奏互不同步 */ async function fetchSpecials() { try { @@ -255,10 +260,11 @@ onBeforeUnmount(pause)
-
+ +
{{ titleOf(e) }} {{ sourceOf(e) }}
@@ -680,6 +686,21 @@ onBeforeUnmount(pause) max-height: 62%; } +/* 有封面:隐藏书脊光影,铺满封面图 */ +.book.has-cover { + background-image: none; + overflow: hidden; +} + +.book-cover { + position: absolute; + inset: 0; + width: 100%; + height: 100%; + object-fit: cover; + border-radius: 2px 6px 6px 2px; +} + .book-source { flex: 0 0 auto; width: 100%;