|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
import { AvatarDropdown, AvatarName, MenuBar } from '@/components';
|
|
|
|
|
import fixMenuItemIcon from '@/utils/FixMenuItemIcon';
|
|
|
|
|
// import fixMenuItemIcon from '@/utils/FixMenuItemIcon';
|
|
|
|
|
import { getAllRouteNameTile, replaceMenuWithRoutesData } from '@/utils/common';
|
|
|
|
|
import { addLocale } from '@@/plugin-locale';
|
|
|
|
|
import type { Settings as LayoutSettings } from '@ant-design/pro-components';
|
|
|
|
@ -78,6 +78,7 @@ export async function getInitialState(): Promise<{
|
|
|
|
|
localStorage.setItem('userInfo', JSON.stringify(currUserInfo));
|
|
|
|
|
return currUserInfo;
|
|
|
|
|
}
|
|
|
|
|
history.push(loginPath);
|
|
|
|
|
return undefined;
|
|
|
|
|
} catch (error) {
|
|
|
|
|
history.push(loginPath);
|
|
|
|
@ -154,11 +155,11 @@ export const layout: RunTimeLayoutConfig = ({ initialState, setInitialState }) =
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
menuRender: () => undefined,
|
|
|
|
|
menuDataRender: () => {
|
|
|
|
|
if (initialState?.menuData !== undefined) {
|
|
|
|
|
return fixMenuItemIcon(initialState?.menuData || []);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// menuDataRender: () => {
|
|
|
|
|
// if (initialState?.menuData !== undefined) {
|
|
|
|
|
// return fixMenuItemIcon(initialState?.menuData || []);
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
bgLayoutImgList: [
|
|
|
|
|
{
|
|
|
|
|
src: 'https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/D2LWSqNny4sAAAAAAAAAAAAAFl94AQBr',
|
|
|
|
|