资讯专栏INFORMATION COLUMN

antd 常用表单组件

HtmlCssJs / 3670人阅读

摘要:表单配置信息有误调用配置名称表单的属性按照加入请输入名称参数按照加入请输入名称请输入请输入名称描述请输入描述多选请输选择单选选择日期选择日期提交布局内容

basicFormUtil.js

import React from "react"
import { Form, Input, Tooltip, Icon, Cascader, Select,Radio, Row, Col,DatePicker, Checkbox, Button, AutoComplete} from "antd";
import moment from "moment";
import "moment/locale/zh-cn";
moment.locale("zh-cn");
const { Option } = Select;
const { TextArea } = Input;
const CheckboxGroup = Checkbox.Group;
const RadioGroup = Radio.Group;
const { MonthPicker, RangePicker,WeekPicker  } = DatePicker;

class basicFormUtil extends React.Component{
    constructor(props){
        super(props);
    }
    handleSubmit = (e) => {
        e.preventDefault();
        this.props.form.validateFieldsAndScroll((err, values) => {
            if (!err) {
                console.log("Received values of form: ", values);
            }
        });
    }
    getInput(item){
        if(item.tag =="Input"){
            return 
        }else if(item.tag =="TextArea"){
            return