From 39f0cda3c00f2cd78793b0935b07c175a3bc7781 Mon Sep 17 00:00:00 2001 From: hocgin Date: Sat, 24 Dec 2022 21:47:47 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=96=B0=E5=A2=9E=E5=8A=9F=E8=83=BD](develop)?= =?UTF-8?q?:=20update?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Promise/components/PageLayout/index.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Promise/components/PageLayout/index.tsx b/src/Promise/components/PageLayout/index.tsx index 2ad7796c..0cd56441 100644 --- a/src/Promise/components/PageLayout/index.tsx +++ b/src/Promise/components/PageLayout/index.tsx @@ -7,7 +7,6 @@ import { fastGetAccess, fastGetMenuDataItem } from './utils'; import { WithFalse } from '@ant-design/pro-layout/es/typing'; import { HeaderViewProps } from '@ant-design/pro-layout/es/components/Header'; import { LocalRoute } from '@/Utils/interface'; -import { useNavigate } from 'react-router-dom'; const DEFAULT_PATHNAME = '/welcome'; @@ -58,7 +57,6 @@ const PageLayout: React.FC = ({ ...rest }) => { // @formatter: on - let navigate = useNavigate(); let { runAsync } = useRequest(useAction.initialValues, { manual: true, }); @@ -86,7 +84,7 @@ const PageLayout: React.FC = ({ rightContentRender={rightContentRender} headerContentRender={() => } menuItemRender={(item, dom) => ( - navigate(item.path || DEFAULT_PATHNAME)}>{dom} + history.pushState({}, null as any, item.path || DEFAULT_PATHNAME)}>{dom} )} footerRender={() =>