Skip to content

Commit

Permalink
perf: menu
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoxian521 committed Mar 3, 2022
1 parent 67bc933 commit fcdfe6d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/layout/components/sidebar/sidebarItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ function hasOneShowingChild(
return true;
});
if (showingChildren[0]?.meta?.showParent) {
return false;
}
if (showingChildren.length === 1) {
return true;
}
Expand Down
1 change: 1 addition & 0 deletions src/layout/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export type childrenType = {
icon?: string;
title?: string;
i18n?: boolean;
showParent?: boolean;
extraIcon?: {
svg?: boolean;
name?: string;
Expand Down

0 comments on commit fcdfe6d

Please sign in to comment.