左侧菜单固定

This commit is contained in:
禺狨 2023-03-22 14:18:22 +08:00
parent 008e297b74
commit 9f4265ebe0
4 changed files with 37 additions and 20 deletions

View File

@ -10,4 +10,11 @@
margin-left: 38px;
margin-bottom: 14px;
}
.menu-box {
width: 200px;
height: 100%;
overflow-y: auto;
overflow-x: hidden;
}
}

View File

@ -140,6 +140,7 @@ export const LeftMenu: React.FC = () => {
>
<img src={logo} className={styles["App-logo"]} />
</div>
<div className={styles["menu-box"]}>
<Menu
onClick={onClick}
style={{
@ -158,5 +159,6 @@ export const LeftMenu: React.FC = () => {
}}
/>
</div>
</div>
);
};

View File

@ -313,6 +313,10 @@ code {
background-color: #ffffff !important;
}
.ant-menu {
border-inline-end: none !important;
}
.ant-menu-item {
width: calc(100% - 32px) !important;
margin-left: 16px !important;

View File

@ -1,16 +1,20 @@
.layout-wrap {
width: 100%;
min-height: 100vh;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: flex;
.left-menu {
width: 200px;
height: auto;
height: 100%;
float: left;
}
.right-cont {
flex: 1;
display: flex;
flex-direction: column;
background-color: #f6f6f6;
.right-top {
width: 100%;
height: 48px;