diff --git a/src/components/Layout/Menu.js b/src/components/Layout/Menu.js index bcc22c0..4d9ad6a 100644 --- a/src/components/Layout/Menu.js +++ b/src/components/Layout/Menu.js @@ -5,7 +5,9 @@ import { Link } from 'react-router-dom' import { arrayToTree, queryArray } from 'utils' import pathToRegexp from 'path-to-regexp' -const Menus = ({ siderFold, darkTheme, navOpenKeys, changeOpenKeys, menu, location }) => { +const Menus = ({ + siderFold, darkTheme, navOpenKeys, changeOpenKeys, menu, location, +}) => { // 生成树状 const menuTree = arrayToTree(menu.filter(_ => _.mpid !== '-1'), 'id', 'mpid') const levelMap = {} @@ -31,7 +33,7 @@ const Menus = ({ siderFold, darkTheme, navOpenKeys, changeOpenKeys, menu, locati } return ( - + {item.icon && } {item.name} diff --git a/src/router.js b/src/router.js index 06e2441..1a8b920 100644 --- a/src/router.js +++ b/src/router.js @@ -3,6 +3,8 @@ import PropTypes from 'prop-types' import { Switch, Route, Redirect, routerRedux } from 'dva/router' import dynamic from 'dva/dynamic' import App from 'routes/app' +import { LocaleProvider } from 'antd' +import enUS from 'antd/lib/locale-provider/en_US' const { ConnectedRouter } = routerRedux @@ -67,10 +69,11 @@ const Routers = function ({ history, app }) { return ( - - - ()} /> - { + + + + ()} /> + { routes.map(({ path, ...dynamics }, key) => ( )) } - - - + + + + ) }