perf: menu

This commit is contained in:
xiaoxian521 2022-03-03 09:27:53 +08:00
parent 67bc933d5c
commit fcdfe6d0c0
2 changed files with 5 additions and 0 deletions

View File

@ -111,6 +111,10 @@ function hasOneShowingChild(
return true; return true;
}); });
if (showingChildren[0]?.meta?.showParent) {
return false;
}
if (showingChildren.length === 1) { if (showingChildren.length === 1) {
return true; return true;
} }

View File

@ -67,6 +67,7 @@ export type childrenType = {
icon?: string; icon?: string;
title?: string; title?: string;
i18n?: boolean; i18n?: boolean;
showParent?: boolean;
extraIcon?: { extraIcon?: {
svg?: boolean; svg?: boolean;
name?: string; name?: string;