Skip to content

Commit

Permalink
[新增功能](develop): update
Browse files Browse the repository at this point in the history
  • Loading branch information
hocgin committed Dec 24, 2022
1 parent 9fd6192 commit 39f0cda
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Promise/components/PageLayout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -58,7 +57,6 @@ const PageLayout: React.FC<PageLayoutProps> = ({
...rest
}) => {
// @formatter: on
let navigate = useNavigate();
let { runAsync } = useRequest(useAction.initialValues, {
manual: true,
});
Expand Down Expand Up @@ -86,7 +84,7 @@ const PageLayout: React.FC<PageLayoutProps> = ({
rightContentRender={rightContentRender}
headerContentRender={() => <ProBreadcrumb />}
menuItemRender={(item, dom) => (
<a onClick={() => navigate(item.path || DEFAULT_PATHNAME)}>{dom}</a>
<a onClick={() => history.pushState({}, null as any, item.path || DEFAULT_PATHNAME)}>{dom}</a>
)}
footerRender={() => <Footer />}
{...rest}
Expand Down

0 comments on commit 39f0cda

Please sign in to comment.