) => {
if (event.key === KeyMap.Enter) {
onPressEnter(event.currentTarget.value, event);
}
onKeyPress(event);
},
...restProps,
};
if (multiline) {
const component = ;
if (showCount) {
const max = inputProps.maxLength;
const len = value ? String(value).length : 0;
return (
{component}
);
}
return component;
}
return ;
},
{
/**
* TextArea 组件
*/
TextArea,
/**
* Password 组件
*/
Password: InputPassword,
/**
* 在表单布局中,和 label 的默认对齐方式
*/
defaultLabelAlign: "middle",
}
);
Input.displayName = "Input";