diff --git a/packages/form/src/components/FormItem/index.tsx b/packages/form/src/components/FormItem/index.tsx index 34666bb37a38..0a93deee682a 100644 --- a/packages/form/src/components/FormItem/index.tsx +++ b/packages/form/src/components/FormItem/index.tsx @@ -170,7 +170,9 @@ type WarpFormItemProps = { * @param WarpFormItemProps * @returns */ -const WarpFormItem: React.FC = ({ +const WarpFormItem: React.FC< + Omit & WarpFormItemProps +> = ({ children, addonAfter, addonBefore, @@ -195,8 +197,35 @@ const WarpFormItem: React.FC = ({ return ( ( + <> + {doms.input} + {typeof help === 'function' + ? help({ + errors: inputProps.errors, + warnings: inputProps.warnings, + }) + : doms.errorList} + {doms.extra} + + ), + }} > {children} @@ -206,6 +235,7 @@ const WarpFormItem: React.FC = ({ return ( = ({
{addonAfter}
) : null} - {doms.extra} {typeof help === 'function' ? help({ errors: inputProps.errors, warnings: inputProps.warnings, }) : doms.errorList} + {doms.extra} ), }}