import type { FormItemProps } from 'antd'; import { isFunction } from 'lodash'; import { isValidElement } from 'react'; export const component = (c: any, v?: any, i?: number) => { return isFunction(c) && !isValidElement(c) ? c(v, i) : c; }; export const withWarpFormItemProps = >(Comp: any) => { return ( props: T & FormItemProps & { changeCleans?: string[]; }, ) => { const { children, ...rest } = props; return {children}; }; };