mirror of
https://github.com/PlayEdu/frontend.git
synced 2025-06-28 20:52:50 +08:00
首页头部初步
This commit is contained in:
parent
872f5baca8
commit
d72e35ed67
@ -23,5 +23,15 @@
|
||||
height: 40px;
|
||||
}
|
||||
}
|
||||
.department-name {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: rgba(0, 0, 0, 0.45);
|
||||
line-height: 24px;
|
||||
background: #f6f6f6;
|
||||
border-radius: 8px 4px 8px 4px;
|
||||
padding: 0 8px;
|
||||
margin-right: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9,6 +9,9 @@ export const Header: React.FC = () => {
|
||||
const dispatch = useDispatch();
|
||||
const navigate = useNavigate();
|
||||
const user = useSelector((state: any) => state.loginUser.value.user);
|
||||
const departments = useSelector(
|
||||
(state: any) => state.loginUser.value.departments
|
||||
);
|
||||
const config = useSelector((state: any) => state.systemConfig.value);
|
||||
|
||||
const onClick: MenuProps["onClick"] = ({ key }) => {
|
||||
@ -59,6 +62,11 @@ export const Header: React.FC = () => {
|
||||
</Link>
|
||||
</div>
|
||||
<div className="d-flex">
|
||||
{departments.length > 0 && (
|
||||
<div className={styles["department-name"]}>
|
||||
{departments[0].name}
|
||||
</div>
|
||||
)}
|
||||
<Button.Group className={styles["button-group"]}>
|
||||
<Dropdown menu={{ items, onClick }} placement="bottomRight">
|
||||
<div className="d-flex">
|
||||
|
Loading…
x
Reference in New Issue
Block a user