import React, { Component } from 'react' import { Select, Input } from 'antd' import PropTypes from 'prop-types' import { autobind } from 'core-decorators' import { connect } from 'react-redux' import { deleteReqParams } from '../../../actions/addInterface.js' import json2html from 'json2html' @connect( state => { return { reqParams: state.addInterface.reqParams } }, { deleteReqParams } ) class ParamsList extends Component { static propTypes = { reqParams: PropTypes.array, dataNum: PropTypes.number, deleteReqParams: PropTypes.func } constructor(props) { super(props) } @autobind deleteReqParams (e) { let newSeqParams = [] let reqParams = this.props.reqParams let dataNum = e.target.getAttribute('data-num') reqParams.map(value => { if (+dataNum !== value.id) { newSeqParams.push(value) } }) this.props.deleteReqParams(newSeqParams) } render () { const Option = Select.Option const dataNum = this.props.dataNum return (
  • 参数名称 参数说明 ×
  • ) } } export default ParamsList