1、本地化

2、解决侧边栏收起时菜单图标悬浮下无菜单文字显示的问题
This commit is contained in:
liutsing
2018-02-16 01:22:44 +08:00
parent 2de1e81661
commit 3fde5aaa3c
2 changed files with 7 additions and 2 deletions
+2 -2
View File
@@ -31,9 +31,9 @@ const Menus = ({ siderFold, darkTheme, navOpenKeys, changeOpenKeys, menu, locati
}
return (
<Menu.Item key={item.id}>
<Link to={item.route || '#'}>
<Link to={item.route || '#'} style={siderFoldN ? {width: 10} : {}}>
{item.icon && <Icon type={item.icon} />}
{(!siderFoldN || !menuTree.includes(item)) && item.name}
<span>{item.name}</span>
</Link>
</Menu.Item>
)
+5
View File
@@ -3,6 +3,9 @@ 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 zh_CN from 'antd/lib/locale-provider/zh_CN';
import 'moment/locale/zh-cn';
const { ConnectedRouter } = routerRedux
@@ -67,6 +70,7 @@ const Routers = function ({ history, app }) {
return (
<ConnectedRouter history={history}>
<LocaleProvider locale={zh_CN}>
<App>
<Switch>
<Route exact path="/" render={() => (<Redirect to="/dashboard" />)} />
@@ -85,6 +89,7 @@ const Routers = function ({ history, app }) {
<Route component={error} />
</Switch>
</App>
</LocaleProvider>
</ConnectedRouter>
)
}