Skip to content

Commit

Permalink
fix(menu): solve the problem of display being cropped by not enabling…
Browse files Browse the repository at this point in the history
… sliding in popup mode Tencent#2057
  • Loading branch information
PBK-B committed Apr 3, 2023
1 parent 063d53a commit 6ce8d8e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/menu/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const Menu = forwardRefWithStatics(
// 菜单宽度
const menuWidthArr = Array.isArray(width) ? width : [width, DEFAULT_MENU_WIDTH[1]];

const { collapsed } = value;
const { collapsed, expandType } = value;

return (
<MenuContext.Provider value={value}>
Expand All @@ -41,7 +41,13 @@ const Menu = forwardRefWithStatics(
>
<div className={`${classPrefix}-default-menu__inner`}>
{logo && <div className={`${classPrefix}-menu__logo`}>{logo}</div>}
<ul className={classNames(`${classPrefix}-menu`, { [`${classPrefix}-menu--scroll`]: !collapsed })}>
<ul
className={classNames(
`${classPrefix}-menu`,
{ [`${classPrefix}-menu--scroll`]: expandType !== 'popup' },
'narrow-scrollbar',
)}
>
{children}
</ul>
{operations && <div className={`${classPrefix}-menu__operations`}>{operations}</div>}
Expand Down

0 comments on commit 6ce8d8e

Please sign in to comment.