This commit is contained in:
zuiidea
2016-12-29 22:34:05 +08:00
parent e4bda2c3ae
commit 75884305a0
4 changed files with 6 additions and 7 deletions
+2 -4
View File
@@ -20,8 +20,6 @@ const getPathSet = function (menuArray, parentPath) {
}
getPathSet(menu)
console.log(pathSet)
function Bread({ location }) {
let pathNames = []
location.pathname.substr(1).split('/').map((item, key) => {
@@ -32,8 +30,8 @@ function Bread({ location }) {
}
})
const breads = pathNames.map((item, key) => {
if(item=='-'){
item='Dashboard'
if(!(item in pathSet)){
item='Dashboard'
}
return (
<Breadcrumb.Item key={key} {...((pathNames.length - 1 == key)||!pathSet[item].clickable)? '' : { href: '#' + pathSet[item].path }}>
-1
View File
@@ -74,7 +74,6 @@ export default {
*changeTheme({
payload
}, {put}) {
console.log("changeTheme");
yield put({
type: 'handleChangeTheme'
})
+3 -1
View File
@@ -183,7 +183,9 @@ export default {
completed:[],
browser:[],
cpu:{},
user:{},
user:{
avatar: 'http://img.hb.aicdn.com/bc442cf0cc6f7940dcc567e465048d1a8d634493198c4-sPx5BR_fw236'
},
},
subscriptions : {
setup({dispatch}) {
+1 -1
View File
@@ -23,7 +23,7 @@ const bodyStyle = {
}
function Dashboard({dashboard,dispatch}) {
console.log({dashboard,dispatch});
const {weather, sales, quote, numbers, recentSales, comments, completed, browser, cpu, user} = dashboard
const numberCards = numbers.map((item, key) => <Col key={key} lg={6} md={12}>
<NumberCard {...item}/>