diff --git a/src/router.js b/src/router.js index bc030b8c50387b04cecdbb06ea325d8e0b39615f..4ba7297663eb9832edc736d41da6b32ddfd2726b 100644 --- a/src/router.js +++ b/src/router.js @@ -1,5 +1,5 @@ import React from 'react'; -import { Router, Switch } from 'dva/router'; +import { routerRedux, Switch } from 'dva/router'; import { LocaleProvider, Spin } from 'antd'; import zhCN from 'antd/lib/locale-provider/zh_CN'; import dynamic from 'dva/dynamic'; @@ -7,6 +7,7 @@ import { getRouterData } from './common/router'; import Authorized from './utils/Authorized'; import styles from './index.less'; +const { ConnectedRouter } = routerRedux; const { AuthorizedRoute } = Authorized; dynamic.setDefaultLoadingComponent(() => { return ; @@ -18,7 +19,7 @@ function RouterConfig({ history, app }) { const BasicLayout = routerData['/'].component; return ( - + - + ); }