BreadcrumbWarp.js
1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import React, { PropTypes } from 'react';
import { connect } from 'react-redux';
import { Steps, Icon, Breadcrumb } from 'antd';
const Step = Steps.Step;
import cx from 'classnames';
import s from './commond.les';
class BreadcrumbWarp extends React.Component {
constructor(props) {
super(props);
this.state = {
}
}
static propTypes = {
crumbsData: PropTypes.array
}
componentDidMount() {
}
componentWillReceiveProps(nextProps) {
}
componentWillUnmount() {
}
render() {
const { crumbsData = [] } = this.props;
return (
<div className={cx(s.bread_crumb_warp)}>
<span className={cx(s.bread_crumb_title)}>当前位置:</span>
<ul className={cx(s.bread_crumb_con)}>
{
crumbsData.map((data, i) => {
return (
<li onClick={() => { document.location.href = data.link }} key={i}><span className={cx(s.text)}>{data.name}</span></li>
)
})
}
</ul>
</div>
)
}
}
export default BreadcrumbWarp;