import AmountInput, { AmountInputProps } from '../../AmountInput'; import withFormItem from '../withFormItem'; import { FieldValues } from 'react-hook-form'; import { FormItemProps } from '../Item'; // 使用高阶组件创建FormInput const FormAmountInput = withFormItem( AmountInput, 'FormAmountInput', {}, { triggerValidationOnChange: true, hideInternalMessage: true, } ); export default FormAmountInput; // 导出支持泛型的类型定义 export type FormAmountInputProps< TFieldValues extends FieldValues = FieldValues > = Omit, 'children'> & AmountInputProps;