From eb85a8536dcd82afa6c3b76f33582c927049e9c8 Mon Sep 17 00:00:00 2001 From: TaskPool Date: Sat, 8 Aug 2026 15:25:18 +0800 Subject: [PATCH] style(NodeSwitcher): unify style with Select component for consistency - Use ui-control and ui-select-trigger classes - Change height to var(--ui-height-md) (36px) - Change font-size to var(--ui-font-md) (14px) - Remove max-width constraint, let width adapt to content - Icon size from 12px to 14px - Menu width now matches button width exactly - Add arrow icon rotation on open --- web/src/components/business/NodeSwitcher.tsx | 21 +++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/web/src/components/business/NodeSwitcher.tsx b/web/src/components/business/NodeSwitcher.tsx index f41ed7a..969b723 100644 --- a/web/src/components/business/NodeSwitcher.tsx +++ b/web/src/components/business/NodeSwitcher.tsx @@ -96,7 +96,7 @@ export function NodeSwitcher() { setMenuStyle({ position: 'fixed', left: rect.left, - width: Math.max(rect.width, 140), + width: rect.width, // 菜单宽度和按钮一致 zIndex: 80, ...(openUp ? { bottom: viewportH - rect.top + 6, top: 'auto' } @@ -148,21 +148,24 @@ export function NodeSwitcher() { const currentLabel = allOptions.find((o) => o.value === selected)?.label || '本机节点' return ( -
+
{open &&