Skip to content

Commit

Permalink
fix(Menu): 修复collapsed的scroll样式 (#2718)
Browse files Browse the repository at this point in the history
* fix(menu): 保持menu--scroll样式与vue同步

* test: #2718
  • Loading branch information
Except10n authored Jan 16, 2024
1 parent e762545 commit 1ed2d13
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/menu/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ 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`)}>
{children}
</ul>
{operations && <div className={`${classPrefix}-menu__operations`}>{operations}</div>}
Expand Down
12 changes: 6 additions & 6 deletions test/snap/__snapshots__/csr.test.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -135936,7 +135936,7 @@ exports[`csr snapshot test > csr test src/menu/_example/closable-side.jsx 1`] =
</span>
</div>
<ul
class="t-menu"
class="t-menu t-menu--scroll"
>
<li
class="t-menu__item"
Expand Down Expand Up @@ -136194,7 +136194,7 @@ exports[`csr snapshot test > csr test src/menu/_example/closable-side.jsx 1`] =
</span>
</div>
<ul
class="t-menu"
class="t-menu t-menu--scroll"
>
<li
class="t-menu__item"
Expand Down Expand Up @@ -140980,7 +140980,7 @@ exports[`csr snapshot test > csr test src/menu/_example/popup-side.jsx 1`] = `
class="t-default-menu__inner"
>
<ul
class="t-menu"
class="t-menu t-menu--scroll"
>
<li
class="t-menu__item"
Expand Down Expand Up @@ -141223,7 +141223,7 @@ exports[`csr snapshot test > csr test src/menu/_example/popup-side.jsx 1`] = `
class="t-default-menu__inner"
>
<ul
class="t-menu"
class="t-menu t-menu--scroll"
>
<li
class="t-menu__item"
Expand Down Expand Up @@ -141469,7 +141469,7 @@ exports[`csr snapshot test > csr test src/menu/_example/popup-side.jsx 1`] = `
class="t-default-menu__inner"
>
<ul
class="t-menu"
class="t-menu t-menu--scroll"
>
<li
class="t-menu__item"
Expand Down Expand Up @@ -141712,7 +141712,7 @@ exports[`csr snapshot test > csr test src/menu/_example/popup-side.jsx 1`] = `
class="t-default-menu__inner"
>
<ul
class="t-menu"
class="t-menu t-menu--scroll"
>
<li
class="t-menu__item"
Expand Down
Loading

0 comments on commit 1ed2d13

Please sign in to comment.