import PasswprdInput from '../../PasswordInput'; import withFormItem from '../withFormItem'; import { FieldValues } from 'react-hook-form'; import { FormItemProps } from '../Item'; import { PasswordInputProps } from 'src/components/PasswordInput/interface'; // 使用高阶组件创建FormInput const FormPasswordInput = withFormItem( PasswprdInput, 'FormPasswordInput', {}, { fallbackValue: '', } ); export default FormPasswordInput; // 导出支持泛型的类型定义 export type FormPasswordInputProps< TFieldValues extends FieldValues = FieldValues > = Omit, 'children'> & PasswordInputProps;