Skip to content

Commit

Permalink
fix: revert layout menu get login
Browse files Browse the repository at this point in the history
  • Loading branch information
ONLY-yours committed Oct 26, 2023
1 parent beef057 commit 0ac98f6
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/layout/src/components/SiderMenu/BaseMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,8 @@ class MenuUtil {
? subMenuItemRender({ ...item, isUrl: false }, defaultTitle, this.props)
: defaultTitle;

const childrenList = this.getNavMenuItems(children, level + 1);

// 如果收起来,没有子菜单了,就不需要展示 group,所以 level 不增加
if (
isGroup &&
Expand All @@ -287,11 +289,6 @@ class MenuUtil {
return this.getNavMenuItems(children, level);
}

const childrenList = this.getNavMenuItems(
children,
isGroup && level === 0 ? level : level + 1,
);

return [
{
type: menuType,
Expand Down

0 comments on commit 0ac98f6

Please sign in to comment.