MainMenu(当前显示的)组件高度超过时会出现下面滚动条,但是想要的是右边的效果
添加以下代码
<template>
<div class="main">
<el-container class="main-content">
<el-aside class="main-aside">
<MainMenu></MainMenu>
</el-aside>
<el-container>
</div>
</template>
<style scoped lang="less">
.main {
height: 100%;
width: 100%;
.main-content {
height: 100%;
width: 100%;
.el-aside {
width: 15vw;
overflow-x: hidden;
overflow-y: auto;
line-height: 200px;
text-align: left;
cursor: pointer;
background-color: #001529;
scrollbar-width: none; /* firefox */
-ms-overflow-style: none; /* IE 10+ */
transition: width 0.3s ease;
&::-webkit-scrollbar {
display: none;
}
}
}
}
</style>