From e684e35ae3cdae2c65cc737b8f2a8054de174eeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A6=BA=E7=8B=A8?= <18119604035@163.com> Date: Tue, 4 Apr 2023 09:08:45 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E5=AF=BC=E8=88=AA=E6=BF=80?= =?UTF-8?q?=E6=B4=BB=E9=80=BB=E8=BE=91=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/compenents/header/index.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/compenents/header/index.tsx b/src/compenents/header/index.tsx index fb8e325..a96a617 100644 --- a/src/compenents/header/index.tsx +++ b/src/compenents/header/index.tsx @@ -51,6 +51,10 @@ export const Header: React.FC = () => { } }, [departments]); + useEffect(() => { + serCurrentNav(location.pathname); + }, [location.pathname]); + const onClick: MenuProps["onClick"] = ({ key }) => { if (key === "login_out") { confirm({