From aa2eac8d519c514c6548b460faf408820618024a Mon Sep 17 00:00:00 2001 From: yml2213 Date: Tue, 4 Aug 2026 11:25:27 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=9E=84=E4=B8=BB=E5=AF=BC=E8=88=AA?= =?UTF-8?q?=E6=A0=8F=E7=88=B6=E5=AD=90=E8=8F=9C=E5=8D=95=E9=80=89=E4=B8=AD?= =?UTF-8?q?=E6=80=81=E4=B8=8E=E6=A0=91=E5=BD=A2=E5=88=86=E6=94=AF=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/index.css | 40 +++++++----- frontend/src/layouts/MainLayout.tsx | 4 +- frontend/src/pages/PlatformMerchants.tsx | 79 ++---------------------- 3 files changed, 33 insertions(+), 90 deletions(-) diff --git a/frontend/src/index.css b/frontend/src/index.css index fd1931b..a164f33 100644 --- a/frontend/src/index.css +++ b/frontend/src/index.css @@ -254,8 +254,8 @@ a:hover { .app-sidebar__item { display: flex; align-items: center; - min-height: 44px; - padding: 10px 14px; + min-height: 40px; + padding: 8px 12px; border-radius: var(--radius-md); font-size: 14px; font-weight: 600; @@ -263,7 +263,17 @@ a:hover { .app-sidebar__item:hover { color: #2563eb; - background: #eff6ff; + background: #f1f5f9; +} + +.app-sidebar__item--parent-active { + color: #2563eb !important; + font-weight: 700; + background: transparent !important; +} + +.app-sidebar__item--parent-active .app-sidebar__icon { + color: #2563eb !important; } .app-sidebar__item--active { @@ -328,28 +338,30 @@ a:hover { .app-sidebar__children { display: flex; flex-direction: column; - gap: 4px; - margin-top: 4px; - padding-left: 36px; + gap: 2px; + margin: 2px 0 4px 22px; + padding-left: 10px; + border-left: 1.5px solid #e2e8f0; } .app-sidebar__child { - min-height: 38px; - padding: 8px 12px; - border-radius: var(--radius-sm); - font-size: 13.5px; + min-height: 34px; + padding: 6px 12px; + border-radius: 6px; + font-size: 13px; font-weight: 500; + color: #64748b; } .app-sidebar__child:hover:not(:disabled) { color: #2563eb; - background: #eff6ff; + background: #f1f5f9; } .app-sidebar__child--active { - color: #1d4ed8 !important; - background: #dbeafe !important; - font-weight: 600; + color: #2563eb !important; + background: #eff6ff !important; + font-weight: 700; } .app-sidebar--collapsed .app-sidebar__brand { diff --git a/frontend/src/layouts/MainLayout.tsx b/frontend/src/layouts/MainLayout.tsx index 5c52916..2cc7268 100644 --- a/frontend/src/layouts/MainLayout.tsx +++ b/frontend/src/layouts/MainLayout.tsx @@ -258,10 +258,12 @@ export default function MainLayout() { const isOpen = openKeys.includes(section.key) const isSelected = selectedKey === section.key const hasSelectedChild = section.children?.some((child) => child.key === selectedKey) + const isParentActive = hasSelectedChild + const isSingleActive = isSelected && !section.children?.length return (
- ), }, @@ -328,7 +277,7 @@ export default function PlatformMerchants() {
@@ -508,26 +457,6 @@ export default function PlatformMerchants() { - setMemberOpen(false)} - destroyOnClose - > -
- - - - - - -
-
-