umi-tablayout
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import React, { useMemo, useRef } from 'react';
|
||||
import { Link } from 'umi';
|
||||
import { Link, Outlet, useLocation } from '@umijs/max';
|
||||
import { Result, Button, Layout, Avatar } from 'antd';
|
||||
import Authorized from '@/utils/Authorized';
|
||||
import { getMatchMenu } from '@umijs/route-utils';
|
||||
@ -22,9 +22,7 @@ const noMatch = (
|
||||
);
|
||||
|
||||
const TopLayout: React.FC<{}> = (props) => {
|
||||
const {
|
||||
children,
|
||||
} = props;
|
||||
const location = useLocation()
|
||||
|
||||
const { Header, Content } = Layout;
|
||||
|
||||
@ -62,7 +60,7 @@ const TopLayout: React.FC<{}> = (props) => {
|
||||
</div>
|
||||
</Header>
|
||||
<Content style={{ padding: '0 24px', marginTop: 64, width: '100%' }}>
|
||||
{children}
|
||||
<Outlet />
|
||||
</Content>
|
||||
</Layout>
|
||||
</Authorized>
|
||||
|
Reference in New Issue
Block a user