Merge pull request #496 from sumile-ting/fix/collapseSubMenuOverflowStyle

fix: 修复非一级子菜单显示位置错误;修改滚动条样式和系统滚动条样式一致
This commit is contained in:
Archer 2024-07-02 13:57:15 +08:00 committed by GitHub
commit 7853231c25
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 2 deletions

View File

@ -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;
}
}
</style>

View File

@ -40,7 +40,7 @@ export const useRenderMenuItem = (menuMode) =>
return (
<ElSubMenu
index={fullPath}
popper-append-to-body
teleported
popperClass={unref(menuMode) === 'vertical' ? `${prefixCls}-popper--vertical` : ''}
>
{{