Browse Source

fix(sidebar): optimize sidebar menu open keys handling #906

Jacky 1 month ago
parent
commit
5460885bd6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/src/layouts/SideBar.vue

+ 1 - 1
app/src/layouts/SideBar.vue

@@ -26,7 +26,7 @@ watch(route, () => {
   const sub = openSub()
   const sub = openSub()
   const p = openKeys.value.indexOf(sub)
   const p = openKeys.value.indexOf(sub)
   if (p === -1)
   if (p === -1)
-    openKeys.value.push(sub)
+    openKeys.value = [sub]
 })
 })
 
 
 const sidebars = computed(() => {
 const sidebars = computed(() => {