From f56f46ae2f741d4128d33449b106173689e5d8b0 Mon Sep 17 00:00:00 2001 From: toom1996 <23cm.cn@gmail.com> Date: Mon, 28 Sep 2026 10:53:33 +0800 Subject: [PATCH] update --- src/components/DetailCountBadge.astro | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/DetailCountBadge.astro b/src/components/DetailCountBadge.astro index 91618e3..aae07d7 100644 --- a/src/components/DetailCountBadge.astro +++ b/src/components/DetailCountBadge.astro @@ -9,14 +9,15 @@ interface Props { mainId: string } const { mainId } = Astro.props -const count = `detailCount(${mainId})` +const q = JSON.stringify(mainId) // 转成带引号的字符串字面量,否则 detailCount(i0008CZYI) 会被 Alpine 当成未定义变量 +const count = `detailCount(${q})` ---