diff --git a/src/Form/collapse-list/index.tsx b/src/Form/collapse-list/index.tsx index 3f8d2a3..b1c64dc 100644 --- a/src/Form/collapse-list/index.tsx +++ b/src/Form/collapse-list/index.tsx @@ -39,7 +39,14 @@ export interface FormCollapseListProps extends Omit, Pick< CollapseGroupProps, - 'className' | 'icon' | 'title' | 'variant' | 'defaultActive' | 'style' + | 'className' + | 'extra' + | 'expandIcon' + | 'icon' + | 'title' + | 'variant' + | 'defaultActive' + | 'style' > { /** 字段名 */ name?: FormItemProps['name']; @@ -61,9 +68,13 @@ export interface FormCollapseListProps maxFileds?: number; /** 删除时调用,返回 false 时取消删除 */ onRemove?: (values: any) => boolean | void | Promise; + /** 是否启用表单项删除按钮,默认为启用 */ + fieldRemoveButton?: boolean; } export const FormCollapseList: React.FC = ({ + extra, + expandIcon, icon, title, variant, @@ -79,6 +90,7 @@ export const FormCollapseList: React.FC = ({ addParams, className, onRemove, + fieldRemoveButton = true, style, ...formListProps }) => { @@ -115,23 +127,25 @@ export const FormCollapseList: React.FC = ({ return ( -