fix(assets): 引用徽标加 z-10 修复被 blur-img 展示层遮盖
灯箱改造(051ca94)把缩略图换成 .blur-img 双层结构后,.blur-img-full 自带 z-index:1,而徽标 span 是 z-index:auto,绘制序被图片压过, 导致「孤儿 / 被 N 篇引用」徽标在 DOM 中存在但不可见。 浏览器实测:修复前 elementsFromPoint 命中 blur-img-full, 修复后命中徽标本身,琥珀色孤儿药丸恢复显示。
This commit is contained in:
parent
99d33b54d2
commit
b98059edcc
@ -318,10 +318,11 @@ pub fn Assets() -> Element {
|
||||
let placeholder = format!("/uploads/{}?w=20", a.path);
|
||||
let img_alt = a.alt.clone().unwrap_or_else(|| a.filename.clone());
|
||||
let is_orphan = asset.ref_count == 0;
|
||||
// z-10:.blur-img-full 带 z-index:1,不提升会被展示层盖住(灯箱改造的回归)。
|
||||
let badge_class = if is_orphan {
|
||||
"absolute top-2 left-2 text-[10px] font-mono px-2 py-0.5 rounded-full backdrop-blur-sm bg-amber-500/80 text-white"
|
||||
"absolute top-2 left-2 z-10 text-[10px] font-mono px-2 py-0.5 rounded-full backdrop-blur-sm bg-amber-500/80 text-white"
|
||||
} else {
|
||||
"absolute top-2 left-2 text-[10px] font-mono px-2 py-0.5 rounded-full backdrop-blur-sm bg-black/50 text-white"
|
||||
"absolute top-2 left-2 z-10 text-[10px] font-mono px-2 py-0.5 rounded-full backdrop-blur-sm bg-black/50 text-white"
|
||||
};
|
||||
rsx! {
|
||||
div {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user