업무
개인
const basicFormMaker = (labelname, name) => (
<Form.Item label={<span style={formStyle.span}>{labelname}</span>}>
{getFieldDecorator(name, {
initialValue: name.includes('newpass') ? pass?.[name] : userInfo?.[name],
whitespace: true,
rules: [
{ validator: name === 'newpassword2' ? passCheck : inputValidate },
],
onChange: (e) => (name.includes('newpass') ? onChangePassword(e, name) : onChangeUserInfo(e, name)),
})(<Input
type={name.includes('newpass') ? 'password' : 'text'}
name={name}
style={inputStyle}
size='large'
disabled={name === 'email'}
/>)}
</Form.Item>
);