3.10 工程代码同步master
This commit is contained in:
@ -40,13 +40,13 @@ const CosMenuLayout: React.FC<BasicLayoutProps> = (props) => {
|
||||
|
||||
const menuDataRef = useRef<MenuDataItem[]>([]);
|
||||
|
||||
useEffect(() => {
|
||||
if (dispatch) {
|
||||
dispatch({
|
||||
type: 'user/fetchCurrent',
|
||||
});
|
||||
}
|
||||
}, []);
|
||||
// useEffect(() => {
|
||||
// if (dispatch) {
|
||||
// dispatch({
|
||||
// type: 'user/fetchCurrent',
|
||||
// });
|
||||
// }
|
||||
// }, []);
|
||||
const authorized = useMemo(
|
||||
() =>
|
||||
getMatchMenu(location.pathname || '/', menuDataRef.current).pop() || {
|
||||
@ -57,15 +57,12 @@ const CosMenuLayout: React.FC<BasicLayoutProps> = (props) => {
|
||||
|
||||
|
||||
return (
|
||||
|
||||
<Authorized authority={authorized!.authority} noMatch={noMatch}>
|
||||
<Promenu />
|
||||
<div style={{marginTop:'5px'}}>
|
||||
{children}
|
||||
</div>
|
||||
|
||||
|
||||
</Authorized>
|
||||
<Authorized authority={authorized!.authority} noMatch={noMatch}>
|
||||
<Promenu />
|
||||
<div className='basicLayout-children' style={{ height: innerHeight - 240 }}>
|
||||
{children}
|
||||
</div>
|
||||
</Authorized>
|
||||
);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user