import { PageActionType } from '@/config/types'; import { useIntl } from '@umijs/max'; import { forwardRef, useImperativeHandle, useRef } from 'react'; import styled from 'styled-components'; import ClusterForm from '../components/cluster-form'; import { ProviderType } from '../config'; const Title = styled.span` display: flex; align-items: center; justify-content: space-between; font-weight: 600; font-size: 14px; .text { font-size: 20px; } `; interface BasicFormProps { provider: ProviderType; action: PageActionType; credentialList: Global.BaseOption[]; currentData?: any; } const BasicForm = forwardRef((props: BasicFormProps, ref) => { const intl = useIntl(); const { provider, credentialList, 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 (
{/* {intl.formatMessage({ id: 'clusters.create.configBasic' })} } marginTop={0} > */}
); }); export default BasicForm;