mirror of
https://github.com/zuiidea/antd-admin
synced 2026-10-27 10:43:45 +00:00
Merge branch 'Maple-Ro-master' into develop
This commit is contained in:
@@ -33,7 +33,7 @@ const Menus = ({
|
||||
}
|
||||
return (
|
||||
<Menu.Item key={item.id}>
|
||||
<Link to={item.route || '#'}>
|
||||
<Link to={item.route || '#'} style={siderFoldN ? { width: 10 } : {}}>
|
||||
{item.icon && <Icon type={item.icon} />}
|
||||
{item.name}
|
||||
</Link>
|
||||
|
||||
+11
-7
@@ -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 (
|
||||
<ConnectedRouter history={history}>
|
||||
<App>
|
||||
<Switch>
|
||||
<Route exact path="/" render={() => (<Redirect to="/dashboard" />)} />
|
||||
{
|
||||
<LocaleProvider locale={enUS}>
|
||||
<App>
|
||||
<Switch>
|
||||
<Route exact path="/" render={() => (<Redirect to="/dashboard" />)} />
|
||||
{
|
||||
routes.map(({ path, ...dynamics }, key) => (
|
||||
<Route key={key}
|
||||
exact
|
||||
@@ -82,9 +85,10 @@ const Routers = function ({ history, app }) {
|
||||
/>
|
||||
))
|
||||
}
|
||||
<Route component={error} />
|
||||
</Switch>
|
||||
</App>
|
||||
<Route component={error} />
|
||||
</Switch>
|
||||
</App>
|
||||
</LocaleProvider>
|
||||
</ConnectedRouter>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user