antd 封装表单

封装表单之后 查询、弹窗、表单都可以用

1.封装表单组件

import React, { useEffect } from 'react'
import { Button, Checkbox, Form, Input, Select } from 'antd';
export default function publicSe(props: any) {
  const {initialValues,type} = props;
  const [form] = Form.useForm();
  const { formConfig } = props
  const onFinish = (values: any) => {
    console.log('Success:', values);
  };
  const onFinishFailed = (errorInfo: any) => {
    console.log('Failed:', errorInfo);
  };
  const showDom = (item) => {
    const { type, placeholder, options, style, disabled } = item
    switch (type) {
      case 'input':
        return 
      case 'select':
        return