From 9205e40660c88bb54e82ba16b1106bff21f147d4 Mon Sep 17 00:00:00 2001 From: "wenbo.dong" Date: Tue, 18 Jul 2017 14:30:33 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E7=BA=BF=E4=B8=8A=E5=9F=9F=E5=90=8D=E9=80=89=E9=A1=B9=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0option=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectList/ProjectList.scss | 3 +++ .../ProjectGroups/ProjectList/index.js | 27 ++++++++++++++----- 2 files changed, 23 insertions(+), 7 deletions(-) create mode 100644 client/containers/ProjectGroups/ProjectList/ProjectList.scss diff --git a/client/containers/ProjectGroups/ProjectList/ProjectList.scss b/client/containers/ProjectGroups/ProjectList/ProjectList.scss new file mode 100644 index 00000000..68aa3fbe --- /dev/null +++ b/client/containers/ProjectGroups/ProjectList/ProjectList.scss @@ -0,0 +1,3 @@ +.ant-input-group-wrapper { + width: 100%; +} diff --git a/client/containers/ProjectGroups/ProjectList/index.js b/client/containers/ProjectGroups/ProjectList/index.js index 1166190a..dc081e9f 100644 --- a/client/containers/ProjectGroups/ProjectList/index.js +++ b/client/containers/ProjectGroups/ProjectList/index.js @@ -1,10 +1,13 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; -import { Table, Button, Modal, Form, Input, Icon, Tooltip } from 'antd'; +import { Table, Button, Modal, Form, Input, Icon, Tooltip, Select } from 'antd'; import { addProject } from '../../../actions/project'; const { TextArea } = Input; const FormItem = Form.Item; +const Option = Select.Option; + +import './ProjectList.scss' const columns = [{ title: 'Name', @@ -59,12 +62,12 @@ const formItemLayout = { addProject } ) - class ProjectList extends Component { constructor(props) { super(props); this.state = { - visible: false + visible: false, + protocol: 'http:\/\/' } } static propTypes = { @@ -80,6 +83,7 @@ class ProjectList extends Component { e.preventDefault(); this.props.form.validateFields((err, values) => { if (!err) { + values.prd_host = this.state.protocol + values.prd_host; console.log('Received values of form: ', values); this.setState({ visible: false @@ -94,9 +98,14 @@ class ProjectList extends Component { visible: false }); } - handleSubmit = (e) => { - console.log(e); + + // 修改线上域名的协议类型 (http/https) + protocolChange = (value) => { + this.setState({ + protocol: value + }) } + render() { const { getFieldDecorator } = this.props.form; return ( @@ -107,7 +116,7 @@ class ProjectList extends Component { onOk={this.handleOk} onCancel={this.handleCancel} > -
+ + + + + )} /> )}