From d72e35ed67e79592c11ac13fe8a95cf81f85a1d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A6=BA=E7=8B=A8?= <18119604035@163.com> Date: Thu, 23 Mar 2023 17:52:59 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E5=A4=B4=E9=83=A8=E5=88=9D?= =?UTF-8?q?=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/compenents/header/index.module.scss | 10 ++++++++++ src/compenents/header/index.tsx | 8 ++++++++ 2 files changed, 18 insertions(+) diff --git a/src/compenents/header/index.module.scss b/src/compenents/header/index.module.scss index 295b10f..11240ea 100644 --- a/src/compenents/header/index.module.scss +++ b/src/compenents/header/index.module.scss @@ -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; + } } } diff --git a/src/compenents/header/index.tsx b/src/compenents/header/index.tsx index 1314375..93f1dea 100644 --- a/src/compenents/header/index.tsx +++ b/src/compenents/header/index.tsx @@ -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 = () => {