import React, { Component } from 'react' import { connect } from 'react-redux'; import PropTypes from 'prop-types' import { fetchInterfaceList } from '../../../../reducer/modules/interface.js'; import { Menu, Button, Input, Icon, Tag } from 'antd'; @connect( state => { return { list: state.inter.list, curProject: state.project.curProject } }, { fetchInterfaceList } ) class InterfaceMenu extends Component { static propTypes = { projectId: PropTypes.string, list: PropTypes.array, fetchInterfaceList: PropTypes.func, curProject: PropTypes.object } constructor(props) { super(props) } componentWillMount(){ this.props.fetchInterfaceList(this.props.projectId) } render() { const items = []; this.props.list.forEach((item, index)=> { items.push( {item.title} ) } ) return
{items}
} } export default InterfaceMenu