File tree Expand file tree Collapse file tree 3 files changed +26
-6
lines changed
Expand file tree Collapse file tree 3 files changed +26
-6
lines changed Original file line number Diff line number Diff line change @@ -61,3 +61,7 @@ class Operation(Column):
6161 label = "操作"
6262 buttons : List [_Action ] = []
6363 name : str = ""
64+
65+
66+ class AbstractControl (Column ):
67+ pass
Original file line number Diff line number Diff line change 1313
1414from pydantic import BaseModel
1515
16- from .column import Column , SelectOption
16+ from .column import AbstractControl , Column , SelectOption
17+ from .forms import Form
1718from .style import FormWidgetSize , Mode
1819
1920
@@ -74,10 +75,6 @@ class FormItemEnum(str, Enum):
7475 picker = "picker"
7576
7677
77- class AbstractControl (Column ):
78- pass
79-
80-
8178class FormItem (AbstractControl ):
8279 """
8380 用户form表单等写入
@@ -395,3 +392,22 @@ class Custom(Column):
395392 html : Optional [str ]
396393 inline : Optional [bool ]
397394 id : Optional [str ]
395+
396+
397+ class SubForm (FormItem ):
398+ """
399+ InputSubForm 子表单
400+ https://aisuda.bce.baidu.com/amis/zh-CN/components/form/input-sub-form
401+ """
402+
403+ type = "input-sub-form"
404+ multiple : Optional [bool ] # 是否为多选模式
405+ btnLabel : Optional [str ] # 按钮默认名称
406+ minLength : Optional [int ] # 限制最小个数。
407+ maxLength : Optional [int ] # 限制最大个数。
408+ draggable : Optional [bool ] # 是否可拖拽排序
409+ addable : Optional [bool ] # 是否可新增
410+ removable : Optional [bool ] # 是否可删除
411+ form : Form
412+ addButtonText : Optional [str ] # 自定义新增一项的文本
413+ showErrorMsg : Optional [bool ] # 是否在左下角显示报错信息
Original file line number Diff line number Diff line change 11from typing import List , Optional
22
33from fast_tmp .amis .base import BaseAmisModel
4- from fast_tmp .amis .formitem import AbstractControl
4+ from fast_tmp .amis .column import AbstractControl
55
66
77class Form (BaseAmisModel ):
You can’t perform that action at this time.
0 commit comments