perf[Navbar]: add scroll bar when the subMenu is too long (#1619)

This commit is contained in:
花裤衩 2019-02-21 16:08:22 +08:00 committed by GitHub
parent fe950801c9
commit 2e89ef444b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 20 additions and 1 deletions

View File

@ -170,8 +170,27 @@
.nest-menu .el-submenu>.el-submenu__title, .nest-menu .el-submenu>.el-submenu__title,
.el-menu-item { .el-menu-item {
&:hover { &:hover {
// You can use $subMenuHover // you can use $subMenuHover
background-color: $menuHover !important; background-color: $menuHover !important;
} }
} }
// the scroll bar appears when the subMenu is too long
>.el-menu--popup {
max-height: 100vh;
overflow-y: auto;
&::-webkit-scrollbar-track-piece {
background: #d3dce6;
}
&::-webkit-scrollbar {
width: 6px;
}
&::-webkit-scrollbar-thumb {
background: #99a9bf;
border-radius: 20px;
}
}
} }