diff --git a/components/input/Password.tsx b/components/input/Password.tsx index 647fa488d3..f8cb46454d 100644 --- a/components/input/Password.tsx +++ b/components/input/Password.tsx @@ -74,13 +74,13 @@ const Password = React.forwardRef((props, ref) => { [`${prefixCls}-${size}`]: !!size, }); - const omittedProps = { + const omittedProps: InputProps = { ...omit(restProps, ['suffix', 'iconRender']), type: visible ? 'text' : 'password', className: inputClassName, prefixCls: inputPrefixCls, suffix: suffixIcon, - } as InputProps; + }; if (size) { omittedProps.size = size;