import React, {Component} from 'react'; import {Input, Select, Button, Row, Col} from 'antd'; const Option = Select.Option; class TencentAPIPath extends Component { constructor(props) { super(props); this.state = { configs: ['apiGWName', 'apiGWDesc', 'requestMethod'], apiGWName: props.apiPath.apiGWName, apiGWDesc: props.apiPath.apiGWDesc, requestMethod: props.apiPath.requestMethod, }; } switchConfig = (label) => { return (e) => { this.setState({ [label]: e.target.value }) }; }; componentWillReceiveProps(next) { this.setState({ apiGWName: next.apiPath.apiGWName, apiGWDesc: next.apiPath.apiGWDesc, requestMethod: next.apiPath.requestMethod, }); }; render() { return (