From 0e87b3011e62d4ed52077bf956d19779ae048cd6 Mon Sep 17 00:00:00 2001 From: nxxy335 Date: Wed, 30 Sep 2026 10:17:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=9B=BE=E5=BA=93?= =?UTF-8?q?=E7=9B=B8=E5=86=8C=E5=B0=81=E9=9D=A2=E4=B8=8D=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=B8=8E=E6=97=A0=E6=B3=95=E8=BF=9B=E5=85=A5=E7=9B=B8=E5=86=8C?= =?UTF-8?q?=EF=BC=88v0.2.0=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因(已定位到具体规则): - .albums-card__cover 是 (inline)但缺少 display:block,inline 元素忽略 width/aspect-ratio → 封面盒子高度为 0,内部 absolute 的 无尺寸可撑开 → 封面完全不可见(卡片只剩名称+张数) - 相册详情页仅依赖路由注入的 photos.items,若该结果为空则显示「暂无照片」,表现为「点不进相册」 修复: - 封面容器补 display:block(封面正常显示) - 封面取值兜底:album.photos 为空时用 photoFinder.listBy(相册名) 取首图(Flux 解包为 List,避免 Mono 链式风险) - 相册瀑布流数据源兜底:photos.items 为空时回退 photoFinder.listBy(group),保证进入相册一定有图; 分页仅在真正使用分页结果时渲染,并对 photos 判空 Co-Authored-By: WorkBuddy --- src/photos.html | 103 ++++++++++++++++++++++++++---------------------- 1 file changed, 55 insertions(+), 48 deletions(-) diff --git a/src/photos.html b/src/photos.html index e870d16..dca0987 100644 --- a/src/photos.html +++ b/src/photos.html @@ -52,6 +52,7 @@ color: var(--color-primary); } :where(.albums-card__cover) { + display: block; position: relative; width: 100%; aspect-ratio: 4 / 3; @@ -237,16 +238,14 @@ th:unless="${rawPhotos != null and !#lists.isEmpty(rawPhotos)}" > - - - + @@ -288,54 +287,62 @@ -
- -
+
+ +
-

- 照片 + 暂无照片

- - -

- 暂无照片 -

+
+