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 39f0cda commit b2c4f6b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Promise/components/PageLayout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ 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 { Link } from 'react-router-dom';

const DEFAULT_PATHNAME = '/welcome';

Expand Down Expand Up @@ -83,9 +84,7 @@ const PageLayout: React.FC<PageLayoutProps> = ({
title={title}
rightContentRender={rightContentRender}
headerContentRender={() => <ProBreadcrumb />}
menuItemRender={(item, dom) => (
<a onClick={() => history.pushState({}, null as any, item.path || DEFAULT_PATHNAME)}>{dom}</a>
)}
menuItemRender={(item, dom) => <Link to={item.path || DEFAULT_PATHNAME}>{dom}</Link>}
footerRender={() => <Footer />}
{...rest}
>
Expand Down

0 comments on commit b2c4f6b

Please sign in to comment.