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, { useEffect, useMemo, useRef } from 'react';
import { Link } from 'umi';
import { Link, Outlet, useLocation } from '@umijs/max';
import { Result, Button } from 'antd';
import Authorized from '@/utils/Authorized';
import { getMatchMenu } from '@umijs/route-utils';
@ -32,11 +32,8 @@ const menuDataRender = (menuList: MenuDataItem[]): MenuDataItem[] =>
const CosMenuLayout: React.FC<BasicLayoutProps> = (props) => {
const {
dispatch,
children,
location = {
pathname: '/',
},
} = props;
const location = useLocation()
const menuDataRef = useRef<MenuDataItem[]>([]);
@ -60,7 +57,7 @@ const CosMenuLayout: React.FC<BasicLayoutProps> = (props) => {
<Authorized authority={authorized!.authority} noMatch={noMatch}>
<Promenu />
<div className='basicLayout-children' style={{ height: innerHeight - 240 }}>
{children}
<Outlet />
</div>
</Authorized>
);