From e0596ef9f1f3ed022396961bf2a82665bebaecf7 Mon Sep 17 00:00:00 2001 From: "zhu.wei1" <540201731@qq.com> Date: Tue, 2 Jul 2024 09:52:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=9D=9E=E4=B8=80?= =?UTF-8?q?=E7=BA=A7=E5=AD=90=E8=8F=9C=E5=8D=95=E6=98=BE=E7=A4=BA=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE=E9=94=99=E8=AF=AF=EF=BC=9B=E4=BF=AE=E6=94=B9=E6=BB=9A?= =?UTF-8?q?=E5=8A=A8=E6=9D=A1=E6=A0=B7=E5=BC=8F=E5=92=8C=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E6=BB=9A=E5=8A=A8=E6=9D=A1=E6=A0=B7=E5=BC=8F=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Menu/src/Menu.vue | 15 ++++++++++++++- .../Menu/src/components/useRenderMenuItem.tsx | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/components/Menu/src/Menu.vue b/src/components/Menu/src/Menu.vue index 56dbf25..083d03c 100644 --- a/src/components/Menu/src/Menu.vue +++ b/src/components/Menu/src/Menu.vue @@ -257,9 +257,22 @@ export default defineComponent({ } } } + @submenu-prefix-cls: ~'@{adminNamespace}-submenu-popper'; + +// 设置子菜单溢出时滚动样式 .@{submenu-prefix-cls}--vertical { - overflow-y: auto; max-height: 100%; + overflow-y: auto; + + &::-webkit-scrollbar { + width: 6px; + background-color: transparent; + } + + &::-webkit-scrollbar-thumb { + background-color: rgb(144 147 153 / 30%); + border-radius: 4px; + } } diff --git a/src/components/Menu/src/components/useRenderMenuItem.tsx b/src/components/Menu/src/components/useRenderMenuItem.tsx index 66c5bf0..96914cc 100644 --- a/src/components/Menu/src/components/useRenderMenuItem.tsx +++ b/src/components/Menu/src/components/useRenderMenuItem.tsx @@ -40,7 +40,7 @@ export const useRenderMenuItem = (menuMode) => return ( {{