Skip to content

Commit

Permalink
fix(menu): 修复最后一个菜单项的子节点没有间距的问题(#2942) (#2944)
Browse files Browse the repository at this point in the history
* fix(menu): 修复最后一个菜单项的子节点没有间距的问题(#2942)

* chore(menu): 生成变更记录文件

---------

Co-authored-by: xiamiao <[email protected]>
  • Loading branch information
xiamiao1121 and xiamiao authored Jul 23, 2024
1 parent 516e30c commit 629731e
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .changeset/funny-sloths-fail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hi-ui/hiui": patch
---

fix(menu): 修复最后一个菜单项的子节点没有间距的问题
5 changes: 5 additions & 0 deletions .changeset/heavy-ladybugs-wink.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hi-ui/menu": patch
---

fix: 修复最后一个菜单项的子节点没有间距的问题
27 changes: 19 additions & 8 deletions packages/ui/menu/src/styles/menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -267,13 +267,13 @@ $disabled-color: use-color('gray', 400) !default;
flex: 1;
overflow: auto;

> .#{$prefix}-item {
&:last-child {
.#{$prefix}-item__inner {
margin-bottom: 0;
}
}
}
// > .#{$prefix}-item {
// &:last-child {
// .#{$prefix}-item__inner {
// margin-bottom: 0;
// }
// }
// }
}

&.#{$prefix}--mini {
Expand All @@ -287,12 +287,23 @@ $disabled-color: use-color('gray', 400) !default;
background-color: use-color('gray', 100);
}
}
&:not(.#{$prefix}--mini) {
.#{$prefix}__wrapper {
> .#{$prefix}-item {
&:last-child {
.#{$prefix}-item__inner {
margin-bottom: 0;
}
}
}
}
}
}

.#{$prefix}__toggle {
width: use-height-size(10);
height: use-height-size(10);
margin-top: use-spacing(4);
// margin-top: use-spacing(4);
cursor: pointer;
display: flex;
align-items: center;
Expand Down

0 comments on commit 629731e

Please sign in to comment.