Skip to content

Commit b6c3a47

Browse files
author
昔梦
committed
feat:cardlist新增一条增加max属性控制
1 parent b410cc4 commit b6c3a47

File tree

1 file changed

+3
-3
lines changed
  • packages/form-render/src/widgets/listCard

1 file changed

+3
-3
lines changed

packages/form-render/src/widgets/listCard/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const CardList = (props: any) => {
4141
renderCore,
4242
hasBackground,
4343
operateBtnType,
44-
44+
4545
addBtnProps,
4646
delConfirmProps,
4747
copyBtnProps,
@@ -122,8 +122,8 @@ const CardList = (props: any) => {
122122
</div>
123123
);
124124
})}
125-
{!hideAdd && (
126-
<div className='fr-list-add-btn'>
125+
{(!schema.max || fields.length < schema.max) && !hideAdd && (
126+
<div className="fr-list-add-btn">
127127
<Button
128128
{...addBtnProps}
129129
onClick={() => addItem()}

0 commit comments

Comments
 (0)