Skip to content

Commit

Permalink
fix: 修复导航模式切换到 single 时有几率报错
Browse files Browse the repository at this point in the history
  • Loading branch information
hooray committed Jan 8, 2024
1 parent 2f1dc07 commit 0dfdb0f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/store/modules/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ const useMenuStore = defineStore(
// 次导航数据
const sidebarMenus = computed<Menu.recordMainRaw['children']>(() => {
return allMenus.value.length > 0
? allMenus.value[actived.value].children
? allMenus.value.length > 1
? allMenus.value[actived.value].children
: allMenus.value[0].children
: []
})
// 次导航第一层最深路径
Expand Down

0 comments on commit 0dfdb0f

Please sign in to comment.