diff --git a/src/components/Item.astro b/src/components/Item.astro
index ea0d238..0944c04 100644
--- a/src/components/Item.astro
+++ b/src/components/Item.astro
@@ -23,6 +23,7 @@ const images = (article?.images ?? [])
.map((im) => ({
id: im.id,
url: full(im.image || ""),
+ raw: im.image || "", // 相对路径:收藏快照存相对地址,不把宿主/端口写死进库
name: im.name || "",
}))
.filter((im) => im.url)
@@ -53,6 +54,10 @@ if (article?.brand_id) {
{
@@ -79,8 +84,10 @@ if (article?.brand_id) {
data-image-index={i}
data-image-url={im.url}
data-image-name={im.name}
+ data-fav-id={im.id}
+ data-fav-url={im.raw}
@click={`openLb(${i})`}
- class="bg-[#f2f2f2] cursor-zoom-in group"
+ class="relative bg-[#f2f2f2] cursor-zoom-in group"
>

+ {/* 单图收藏:hover 显示,已收藏常驻实心 */}
+
+
{im.name && (
{im.name}
@@ -140,6 +162,18 @@ if (article?.brand_id) {
x-text="`${lbIndex + 1} / ${imageCount}`"
>
+