From 64ad40ca6181da5e80d0709f8a9e7998905c4397 Mon Sep 17 00:00:00 2001 From: xfy Date: Fri, 3 Jul 2026 11:08:04 +0800 Subject: [PATCH] =?UTF-8?q?fix(admin/posts):=20Tooltip=20=E5=8C=85?= =?UTF-8?q?=E8=A3=B9=E5=90=8E=E6=93=8D=E4=BD=9C=E6=8C=89=E9=92=AE=E6=81=A2?= =?UTF-8?q?=E5=A4=8D=E5=9E=82=E7=9B=B4=E5=B1=85=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Tooltip 外层 div 由块级改为 inline-flex,作为行内伸缩盒参与 flex 行对齐,不再撑高或破坏基线 - 操作列容器补 items-center,显式锁定所有子项垂直居中 --- src/components/ui.rs | 2 +- src/pages/admin/posts.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/ui.rs b/src/components/ui.rs index 225002b..d8a70ca 100644 --- a/src/components/ui.rs +++ b/src/components/ui.rs @@ -222,7 +222,7 @@ pub fn Tooltip( "bottom-full mb-2" }; rsx! { - div { class: "group relative", + div { class: "group relative inline-flex", {children} div { class: "{TOOLTIP_STYLE} {position_class}", "{tip}" } } diff --git a/src/pages/admin/posts.rs b/src/pages/admin/posts.rs index ba480d8..fae6791 100644 --- a/src/pages/admin/posts.rs +++ b/src/pages/admin/posts.rs @@ -309,7 +309,7 @@ fn PostRow( } td { class: "px-4 py-3 text-paper-secondary", "{date_str}" } td { class: "px-4 py-3 text-right", - div { class: "flex justify-end gap-3", + div { class: "flex justify-end items-center gap-3", Link { class: "text-xs text-paper-secondary hover:text-paper-primary transition-colors cursor-pointer", to: Route::WriteEdit { id: post.id },