|
|
|
@ -7,6 +7,8 @@ import { history, Link } from '@umijs/max'; |
|
|
|
import defaultSettings from '../config/defaultSettings'; |
|
|
|
import { errorConfig } from './requestErrorConfig'; |
|
|
|
import { currentUser as queryCurrentUser } from './services/ant-design-pro/api'; |
|
|
|
import { Skeleton } from 'antd'; |
|
|
|
|
|
|
|
const isDev = process.env.NODE_ENV === 'development'; |
|
|
|
const loginPath = '/user/login'; |
|
|
|
|
|
|
|
@ -101,7 +103,9 @@ export const layout: RunTimeLayoutConfig = ({ initialState, setInitialState }) = |
|
|
|
// unAccessible: <div>unAccessible</div>,
|
|
|
|
// 增加一个 loading 的状态
|
|
|
|
childrenRender: (children) => { |
|
|
|
// if (initialState?.loading) return <PageLoading />;
|
|
|
|
if (initialState?.loading) { |
|
|
|
return <Skeleton active style={{ margin: '24px 40px' }} />; |
|
|
|
} |
|
|
|
return ( |
|
|
|
<> |
|
|
|
{children} |
|
|
|
|