优化FormItemsRenderer
parent
5eadb56698
commit
7e9d9e9fad
|
|
@ -119,7 +119,7 @@ export interface FormOption<T extends keyof FORM_ITEM_RENDER_TYPE_MAP = keyof FO
|
|||
/** 是否仅用于保存标签,不渲染到页面上,只在表单中保存数据,默认 false */
|
||||
onlyForLabel?: boolean;
|
||||
/** Form.List 独有的属性 */
|
||||
formListUniqueProps?: FormListUniqueProps;
|
||||
formListUniqueProps?: FormListUniqueProps | ((formValues: FormValues) => FormListUniqueProps);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -249,10 +249,10 @@ const FormItemsRenderer = ({
|
|||
|
||||
switch (render) {
|
||||
case FORM_ITEM_RENDER_ENUM.INPUT:
|
||||
return <Input placeholder={placeholder} maxLength={50} {...componentProps} />;
|
||||
return <Input placeholder={placeholder} maxLength={option.useConstraints !== false ? 50 : 9999} {...componentProps} />;
|
||||
|
||||
case FORM_ITEM_RENDER_ENUM.TEXTAREA:
|
||||
return <TextArea placeholder={placeholder} maxLength={500} showCount={true} rows={3} {...componentProps} />;
|
||||
return <TextArea placeholder={placeholder} maxLength={option.useConstraints !== false ? 500 : 9999} showCount={true} rows={3} {...componentProps} />;
|
||||
|
||||
case FORM_ITEM_RENDER_ENUM.INPUT_NUMBER:
|
||||
case FORM_ITEM_RENDER_ENUM.NUMBER:
|
||||
|
|
|
|||
Loading…
Reference in New Issue