From 629731e5b3c5f98e70599ae06eb88609336d3467 Mon Sep 17 00:00:00 2001 From: xiamiao1121 <74885998+xiamiao1121@users.noreply.github.com> Date: Tue, 23 Jul 2024 17:46:45 +0800 Subject: [PATCH] =?UTF-8?q?fix(menu):=20=E4=BF=AE=E5=A4=8D=E6=9C=80?= =?UTF-8?q?=E5=90=8E=E4=B8=80=E4=B8=AA=E8=8F=9C=E5=8D=95=E9=A1=B9=E7=9A=84?= =?UTF-8?q?=E5=AD=90=E8=8A=82=E7=82=B9=E6=B2=A1=E6=9C=89=E9=97=B4=E8=B7=9D?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98(#2942)=20(#2944)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(menu): 修复最后一个菜单项的子节点没有间距的问题(#2942) * chore(menu): 生成变更记录文件 --------- Co-authored-by: xiamiao --- .changeset/funny-sloths-fail.md | 5 +++++ .changeset/heavy-ladybugs-wink.md | 5 +++++ packages/ui/menu/src/styles/menu.scss | 27 +++++++++++++++++++-------- 3 files changed, 29 insertions(+), 8 deletions(-) create mode 100644 .changeset/funny-sloths-fail.md create mode 100644 .changeset/heavy-ladybugs-wink.md 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;