umi-tablayout

This commit is contained in:
lix
2025-07-07 16:40:14 +08:00
parent 736f004b6b
commit 1e940183cd
186 changed files with 525 additions and 294 deletions

View File

@ -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>