umi-tablayout
This commit is contained in:
@ -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>
|
||||
);
|
||||
|
Reference in New Issue
Block a user