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

This commit is contained in:
Jacky 2025-03-09 00:33:11 +00:00
parent 2026f0d3ac
commit 5460885bd6
No known key found for this signature in database
GPG key ID: 215C21B10DF38B4D

View file

@ -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(() => {