import PageTools from '@/components/page-tools'; import { PageActionType } from '@/config/types'; import { useIntl } from '@umijs/max'; import { forwardRef, useImperativeHandle, useRef } from 'react'; import styled from 'styled-components'; import Parameters from '../forms/parameters'; const Title = styled.span` display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: 16px; .text { font-size: 20px; } `; interface BasicFormProps { action: PageActionType; currentData?: any; } const ParametersForm = forwardRef((props: BasicFormProps, ref) => { const intl = useIntl(); const { action, currentData } = props; const formRef = useRef(null); const handleOnFinish = (values: any) => { console.log(values); }; useImperativeHandle(ref, () => ({ validateFields: formRef.current?.validateFields, getFieldsValue: formRef.current?.getFieldsValue, submit: formRef.current?.submit })); return (
Parameters Configuration} marginTop={0} >
); }); export default ParametersForm;