diff --git a/src/components/layout/bread.jsx b/src/components/layout/bread.jsx
index 031dae6..8dcf4cd 100644
--- a/src/components/layout/bread.jsx
+++ b/src/components/layout/bread.jsx
@@ -32,20 +32,17 @@ function Bread({ location }) {
}
})
const breads = pathNames.map((item, key) => {
- if (item=='-'){
- return
- 无
-
- }else {
- return (
-
- {pathSet[item].icon
- ?
- : ''}
- {pathSet[item].name}
-
- )
+ if(item=='-'){
+ item='Dashboard'
}
+ return (
+
+ {pathSet[item].icon
+ ?
+ : ''}
+ {pathSet[item].name}
+
+ )
})
return (
diff --git a/src/router.js b/src/router.js
index 5b77f59..a03d747 100644
--- a/src/router.js
+++ b/src/router.js
@@ -1,7 +1,6 @@
import React from 'react'
import {Router} from 'dva/router'
import App from './routes/app'
-import Error from './routes/error'
export default function ({history, app}) {
@@ -9,9 +8,12 @@ export default function ({history, app}) {
{
path: '/',
component: App,
- // IndexRoute:{
- // component: Error,
- // },
+ getIndexRoute(nextState, cb) {
+ require.ensure([], require => {
+ app.model(require('./models/dashboard'))
+ cb(null, {component: require('./routes/dashboard')})
+ })
+ },
childRoutes: [
{
path: 'dashboard',