diff --git a/src/app.tsx b/src/app.tsx index d7aa4f6c..f88c0681 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -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:
unAccessible
, // 增加一个 loading 的状态 childrenRender: (children) => { - // if (initialState?.loading) return ; + if (initialState?.loading) { + return ; + } return ( <> {children}