diff --git a/.changeset/funny-sloths-fail.md b/.changeset/funny-sloths-fail.md new file mode 100644 index 000000000..a14af4b6d --- /dev/null +++ b/.changeset/funny-sloths-fail.md @@ -0,0 +1,5 @@ +--- +"@hi-ui/hiui": patch +--- + +fix(menu): 修复最后一个菜单项的子节点没有间距的问题 diff --git a/.changeset/heavy-ladybugs-wink.md b/.changeset/heavy-ladybugs-wink.md new file mode 100644 index 000000000..8abda92f4 --- /dev/null +++ b/.changeset/heavy-ladybugs-wink.md @@ -0,0 +1,5 @@ +--- +"@hi-ui/menu": patch +--- + +fix: 修复最后一个菜单项的子节点没有间距的问题 diff --git a/packages/ui/menu/src/styles/menu.scss b/packages/ui/menu/src/styles/menu.scss index b2ab12f65..e0c58a4be 100644 --- a/packages/ui/menu/src/styles/menu.scss +++ b/packages/ui/menu/src/styles/menu.scss @@ -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 { @@ -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;