diff --git a/src/index.less b/src/index.less index bd58c5d5642c3c6145497427a3fc9c4d870fd47a..047d86cc24dff69bf3fbc50733e612b45e235e4e 100644 --- a/src/index.less +++ b/src/index.less @@ -7,3 +7,8 @@ body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } + +.globalSpin { + width: 100%; + margin: 40px 0 !important; +} diff --git a/src/router.js b/src/router.js index 0000e9787585d4e20251f1bd8984d7708d10b2bb..c82ce7116f50fcabccc14253b3801b738d90e5be 100644 --- a/src/router.js +++ b/src/router.js @@ -1,8 +1,13 @@ import React from 'react'; import { Router, Route, Switch } from 'dva/router'; -import { LocaleProvider } from 'antd'; +import { LocaleProvider, Spin } from 'antd'; import zhCN from 'antd/lib/locale-provider/zh_CN'; import dynamic from 'dva/dynamic'; +import styles from './index.less'; + +dynamic.setDefaultLoadingComponent(() => { + return ; +}); function RouterConfig({ history, app }) { const BasicLayout = dynamic({