From 00edcedbcfdd8e55bbdc222b249e46f3ccb0db34 Mon Sep 17 00:00:00 2001 From: que01 Date: Tue, 13 Oct 2026 16:04:19 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=E9=A2=84=E8=A7=88?= =?UTF-8?q?=E5=8C=BA=E5=9F=9F=E9=80=89=E6=8B=A9=E6=8F=90=E7=A4=BA=E5=B8=83?= =?UTF-8?q?=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/features/brand/ComponentTemplatePreview.css | 10 ++++++++-- .../src/features/brand/ComponentTemplatePreview.tsx | 4 +++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/apps/admin/src/features/brand/ComponentTemplatePreview.css b/apps/admin/src/features/brand/ComponentTemplatePreview.css index 3134f4c..880a1b7 100644 --- a/apps/admin/src/features/brand/ComponentTemplatePreview.css +++ b/apps/admin/src/features/brand/ComponentTemplatePreview.css @@ -128,9 +128,10 @@ .component-template-preview__outline span { position: absolute; - bottom: 100%; + top: 0; left: 0; - max-width: 100%; + max-width: calc(100% - 8px); + transform: translateY(-100%); padding: 2px 7px; overflow: hidden; border-radius: 4px 4px 0 0; @@ -142,6 +143,11 @@ white-space: nowrap; } +.component-template-preview__outline.is-selected span { + top: 4px; + transform: none; +} + .component-template-preview__tools[hidden] { display: none; } diff --git a/apps/admin/src/features/brand/ComponentTemplatePreview.tsx b/apps/admin/src/features/brand/ComponentTemplatePreview.tsx index 68af637..b53324e 100644 --- a/apps/admin/src/features/brand/ComponentTemplatePreview.tsx +++ b/apps/admin/src/features/brand/ComponentTemplatePreview.tsx @@ -89,7 +89,9 @@ export function ComponentTemplatePreview({ position(node, outlines.selected); host.append(node); } - for (const outline of outlines.composite) { + for (const outline of outlines.composite.filter( + (item) => item.key !== selection?.targetKey, + )) { const node = document.createElement("button"); node.type = "button"; node.className = "component-template-preview__composite-select";