From 232a0641cbb2096ecc4c8529bed027143db8e07f Mon Sep 17 00:00:00 2001 From: kjh2064 Date: Sat, 15 Aug 2026 20:44:38 +0900 Subject: [PATCH] fix(fe): refine sidebar section toggle to avoid unnecessary page re-navigation --- frontend/src/shared/shell/KsSidebar.vue | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/frontend/src/shared/shell/KsSidebar.vue b/frontend/src/shared/shell/KsSidebar.vue index b12cf9d0..285c5fd0 100644 --- a/frontend/src/shared/shell/KsSidebar.vue +++ b/frontend/src/shared/shell/KsSidebar.vue @@ -102,15 +102,12 @@ watch(() => route.path, (newPath) => { const isActive = (path: string) => route.path === path -const toggleSection = (itemId: string, defaultPath?: string) => { +const toggleSection = (itemId: string) => { if (expandedSections.value.has(itemId)) { expandedSections.value.delete(itemId) } else { expandedSections.value.add(itemId) } - if (defaultPath) { - router.push(defaultPath) - } } const isSectionExpanded = (itemId: string) => expandedSections.value.has(itemId) @@ -160,7 +157,7 @@ const sidebarClass = computed(() => ({ }, ]" :title="item.label" - @click="item.children ? toggleSection(item.id, item.path) : handleMenuClick(item.path)" + @click="item.children ? toggleSection(item.id) : handleMenuClick(item.path)" > {{ item.icon }} {{ item.label }}