Template
1
0
mirror of https://github.com/un-pany/v3-admin-vite.git synced 2025-04-20 10:59:21 +08:00

fix: 左侧导航菜单在高度不足时渲染不全的问题

This commit is contained in:
pany 2024-11-20 19:49:01 +08:00
parent 4f01de4e92
commit c168ef7ab8
2 changed files with 3 additions and 14 deletions

View File

@ -73,6 +73,7 @@ $transition-time: 0.35s;
}
.sidebar-container {
background-color: var(--el-menu-bg-color);
transition: width $transition-time;
width: var(--v3-sidebar-width) !important;
height: 100%;

View File

@ -43,8 +43,6 @@ const sidebarMenuHoverBgColor = computed(() => {
const tipLineWidth = computed(() => {
return !isTop.value ? "2px" : "0px"
})
/** 当为顶部模式时隐藏垂直滚动条 */
const hiddenScrollbarVerticalBar = computed(() => isTop.value ? "none" : "block")
</script>
<template>
@ -87,20 +85,15 @@ const hiddenScrollbarVerticalBar = computed(() => isTop.value ? "none" : "block"
.has-logo {
.el-scrollbar {
// 1% 1px 线
height: calc(101% - var(--v3-header-height));
height: calc(100% - var(--v3-header-height));
}
}
.el-scrollbar {
// 1%
height: 101%;
height: 100%;
:deep(.scrollbar-wrapper) {
//
overflow-x: hidden !important;
.el-scrollbar__view {
height: 100%;
}
}
//
:deep(.el-scrollbar__bar) {
@ -108,16 +101,11 @@ const hiddenScrollbarVerticalBar = computed(() => isTop.value ? "none" : "block"
//
display: none;
}
&.is-vertical {
//
display: v-bind(hiddenScrollbarVerticalBar);
}
}
}
.el-menu {
border: none;
min-height: 100%;
width: 100% !important;
}