yapi/client/containers/AddInterface/ReqParams/ParamsList.js
2017-07-26 12:40:58 +08:00

64 lines
1.8 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// 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 (
// <li>
// <Select defaultValue="选填" style={{ width: 'auto' }} onChange={this.handleChange} size="large" className="required">
// <Option value="必填">必填</Option>
// <Option value="选填">选填</Option>
// </Select>
// <em className="title">参数名称</em>
// <Input placeholder="参数名称" className="name" size="large" />
// <em className="title">参数说明</em>
// <Input placeholder="参数说明" className="name" size="large" />
// <span className="close" onClick={this.deleteReqParams} data-num={dataNum}>×</span>
// </li>
// )
// }
// }
// export default ParamsList