diff --git a/packages/app/src/components/form.fields/input/index.tsx b/packages/app/src/components/form.fields/input/index.tsx index 9ff0cfe39..df40e0bdc 100644 --- a/packages/app/src/components/form.fields/input/index.tsx +++ b/packages/app/src/components/form.fields/input/index.tsx @@ -6,7 +6,15 @@ import { acceptEnum, mapStyledProps, mapTextComponent } from '../shared' export const Input = connect<'TextArea'>({ getProps: mapStyledProps, getComponent: mapTextComponent -})(acceptEnum(AntdInput)) +})(acceptEnum(({onChange, ...restProps}) => ( + { + // 文本字段,如果空要 null 处理 + onChange(e.target.value ? e : null); + }} + /> +))) Input.TextArea = connect({ getProps: mapStyledProps,