fix: 修复非一级子菜单显示位置错误;修改滚动条样式和系统滚动条样式一致

This commit is contained in:
zhu.wei1 2024-07-02 09:52:57 +08:00
parent 0c9f91bfb2
commit e0596ef9f1
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` : ''}
>
{{