BreadcrumbWarp.js 1.2 KB
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;