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'; const { TextArea } = Input; const FormItem = Form.Item; const columns = [{ title: 'Name', dataIndex: 'name', key: 'name', render: text => {text} }, { title: 'Age', dataIndex: 'age', key: 'age' }, { title: 'Action', key: 'action', render: () => ( 修改 删除 ) }]; const data = [{ key: '1', age: 32 }, { key: '2', age: 42 }, { key: '3', age: 32 }]; const formItemLayout = { labelCol: { xs: { span: 24 }, sm: { span: 6 } }, wrapperCol: { xs: { span: 24 }, sm: { span: 14 } } }; class ProjectList extends Component { constructor(props) { super(props); this.state = { visible: false } } static propTypes = { form: PropTypes.object } addProject = () => { this.setState({ visible: true }); } handleOk = (e) => { e.preventDefault(); this.props.form.validateFields((err, values) => { if (!err) { console.log('Received values of form: ', values); this.setState({ visible: false }); } }); } handleCancel = () => { this.props.form.resetFields(); this.setState({ visible: false }); } handleSubmit = (e) => { console.log(e); } render() { const { getFieldDecorator } = this.props.form; return (
{getFieldDecorator('name', { rules: [{ required: true, message: '请输入项目名称!' }] })( )} 线上域名  )} > {getFieldDecorator('prd_host', { rules: [{ required: true, message: '请输入项目线上域名!' }] })( )} {getFieldDecorator('basepath', { rules: [{ required: true, message: '请输入项目基本路径!' }] })( )} {getFieldDecorator('desc', { rules: [{ required: true, message: '请输入描述!' }] })(