This commit is contained in:
zuiidea
2016-10-15 01:53:58 +08:00
parent 8c12c1690d
commit 0255f197f4
2 changed files with 24 additions and 9 deletions
+8 -9
View File
@@ -1,6 +1,5 @@
import React, {PropTypes} from 'react'
import {Breadcrumb, Icon} from 'antd'
import {Link} from 'dva/router'
import styles from './main.less'
import {config, menu} from '../../utils'
@@ -31,13 +30,11 @@ function Bread({location}) {
})
const breads = pathNames.map((item, key) => {
return (
<Breadcrumb.Item key={key}>
<Link to={pathSet[item].path}>
{pathSet[item].icon
? <Icon type={pathSet[item].icon}/>
: ''}
{pathSet[item].name}
</Link>
<Breadcrumb.Item key={key} {...pathNames.length - 1 == key ? '': { href:"#" + pathSet[item].path }}>
{pathSet[item].icon
? <Icon type={pathSet[item].icon}/>
: ''}
<span>{pathSet[item].name}</span>
</Breadcrumb.Item>
)
})
@@ -45,7 +42,9 @@ function Bread({location}) {
return (
<div className={styles.bread}>
<Breadcrumb>
<Breadcrumb.Item>仪表盘</Breadcrumb.Item>
<Breadcrumb.Item href="#/"><Icon type="home"/>
<span>主页</span>
</Breadcrumb.Item>
{breads}
</Breadcrumb>
</div>
+16
View File
@@ -4,6 +4,7 @@ body {
background-color: #f8f8f8;
}
// scrollbar
::-webkit-scrollbar-corner {
background-color: transparent;
}
@@ -32,3 +33,18 @@ body {
::-webkit-scrollbar:hover {
background-color: transparent;
}
:global .ant-breadcrumb {
& > span {
&:last-child {
color: #999;
font-weight: normal;
}
}
}
:global .ant-breadcrumb-link {
.anticon + span {
margin-left: 4px;
}
}