左侧菜单优化

This commit is contained in:
禺狨 2023-03-09 16:57:47 +08:00
parent 3a6fd54b2b
commit cafc416a77
3 changed files with 15 additions and 10 deletions

View File

@ -1,5 +1,11 @@
.app-header {
background-color: white !important;
box-sizing: border-box;
-moz-box-sizing: border-box;
/* Firefox */
-webkit-box-sizing: border-box;
/* Safari */
padding: 0px 24px;
}
.main-header {
@ -22,4 +28,3 @@
display: flex;
align-items: center;
}

View File

@ -1,13 +1,11 @@
import React from "react";
import styles from "./index.module.less";
import { Layout, Button, Dropdown, MenuProps, Image } from "antd";
import { Button, Dropdown, MenuProps, Image } from "antd";
import { useSelector } from "../../store/hooks";
import { useDispatch } from "react-redux";
import { useNavigate } from "react-router-dom";
import { LoginOutActionCreator } from "../../store/user/userActions";
import avatar from "../../assets/images/commen/avatar.png";
import edit from "../../assets/images/commen/edit.png";
import logout from "../../assets/images/commen/logout.png";
import { PoweroffOutlined, UnlockOutlined } from "@ant-design/icons";
export const Header: React.FC = () => {
@ -37,7 +35,7 @@ export const Header: React.FC = () => {
];
return (
<div className={styles["app-header"]}>
<Layout.Header className={styles["main-header"]}>
<div className={styles["main-header"]}>
<div></div>
<Button.Group className={styles["button-group"]}>
<Dropdown menu={{ items, onClick }} placement="bottomRight">
@ -49,7 +47,7 @@ export const Header: React.FC = () => {
</div>
</Dropdown>
</Button.Group>
</Layout.Header>
</div>
</div>
);
};

View File

@ -155,10 +155,7 @@ code {
background-color: #ffffff !important;
}
.ant-menu-item-selected {
background-color: #ff4d4f !important;
color: white !important;
}
.ant-menu-submenu-active > .ant-menu-submenu-title {
background-color: rgba(#ff4d4f, 0.1) !important;
@ -168,6 +165,11 @@ code {
background-color: rgba(#ff4d4f, 0.1) !important;
}
.ant-menu-item-selected {
background-color: #ff4d4f !important;
color: white !important;
}
.ant-menu-submenu-selected > .ant-menu-submenu-title {
color: #ff4d4f !important;
}