From 3a44de941dd3ae9d6204635f223bc66c3308cdd6 Mon Sep 17 00:00:00 2001 From: Huarch Date: Fri, 10 Jul 2026 18:52:01 +0800 Subject: [PATCH] style(map): refine layer and zoom controls --- features/map/core/components/layer-panel.tsx | 21 +++---- features/map/core/components/zoom.tsx | 61 ++++++++++++-------- 2 files changed, 46 insertions(+), 36 deletions(-) diff --git a/features/map/core/components/layer-panel.tsx b/features/map/core/components/layer-panel.tsx index 640a715..29535c3 100644 --- a/features/map/core/components/layer-panel.tsx +++ b/features/map/core/components/layer-panel.tsx @@ -46,7 +46,7 @@ function LayerVisibilitySection({ items, onToggleLayer }: LayerVisibilitySection return (
业务图层
-
+
{items.map((item) => { const Icon = item.visible ? Eye : EyeOff; const disabled = item.disabled || item.locked; @@ -57,33 +57,28 @@ function LayerVisibilitySection({ items, onToggleLayer }: LayerVisibilitySection type="button" disabled={disabled} aria-pressed={item.visible} + aria-label={`${item.label}${item.description ? `,${item.description}` : ""}`} + title={item.description} onClick={() => onToggleLayer(item.id, !item.visible)} className={cn( - "flex min-h-12 w-full items-center gap-3 border px-2.5 text-left text-sm transition duration-150", + "relative flex min-h-[76px] w-full flex-col items-center justify-center gap-1.5 border px-1.5 py-2 text-center transition duration-150 active:translate-y-px active:scale-[0.98]", MAP_COMPACT_RADIUS_CLASS_NAME, item.visible - ? "border-blue-100 bg-white/95 text-slate-900" - : "border-white/70 bg-white/95 text-slate-500 hover:border-slate-200 hover:bg-white", + ? "border-blue-200 bg-blue-50/90 text-blue-950 shadow-sm shadow-blue-950/5" + : "border-white/70 bg-white/90 text-slate-500 hover:border-slate-200 hover:bg-white", disabled && "cursor-not-allowed opacity-60 hover:bg-transparent" )} > {item.locked ? - - {item.label} - {item.description ? {item.description} : null} - -