dev #1

Merged
toom1996 merged 18 commits from dev into main 2026-10-19 17:49:29 +08:00
152 changed files with 18771 additions and 5411 deletions
Showing only changes of commit f56f46ae2f - Show all commits

View File

@ -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})`
---
<button
type="button"
x-show={`${count} > 0`}
x-cloak
@click.stop={`openDetailLb(${mainId})`}
@click.stop={`openDetailLb(${q})`}
:title={`${count} + ' detail' + (${count} > 1 ? 's' : '')`}
:aria-label={`${count} + ' detail' + (${count} > 1 ? 's' : '')`}
class="absolute left-2 bottom-2 z-10 flex items-center gap-1 px-1.5 py-1 bg-white/85 backdrop-blur-sm border border-black/15 text-[#111] text-[10px] uppercase tracking-[0.14em] cursor-pointer hover:bg-black hover:text-white transition-colors"