在表单控件API文档中我们得知不同类型控件的选项是不同的,控件选项是在表单设计器设计时生成的。在运行时只有极少数的属性修改会产生影响,尽管如此也不建议在运行时修改选项属性,了解属性详细含义有助于我们排查错误。
输入类控件
共有属性
成员 | 类型 | 默认值 | 说明 |
name | string | '' | 控件名称 |
name_i18n | object | null | null | 多语言 |
visible | boolean | true | 是否可见 |
style | string | null | null | 控件样式 |
displayFormula | string | '' | 显示条件表达式 |
onChange | string | null | null | 变更事件 |
requiredFormula | string | '' | 必填条件表达式 |
单文本
成员 | 类型 | 默认值 | 说明 |
defaultValue | string | null | null | 默认值 |
placeholder | string | '请输入' | 水印 |
regexp | string | null | null | 正则校验表达式 |
regexpText | string | '' | 正则错误提示 |
maxLength | number | 128 | 最大长度 |
长文本
成员 | 类型 | 默认值 | 说明 |
defaultValue | string | null | null | 默认值 |
maxLength | number | 2000 | 最大长度 |
数值
成员 | 类型 | 默认值 | 说明 |
defaultValue | string | null | null | 默认值 |
placeholder | string | '请输入' | 水印 |
computeFormula | string | '' | 计算规则表达式 |
format | string | 'integer' | 显示格式 |
日期
成员 | 类型 | 默认值 | 说明 |
defaultValue | 'none' | 'current' | 'dataItemDefault' | 'none' | 默认值 |
dataItemDefault | string | '' | 数据项默认值 |
format | string | 'YYYY-MM-DD' | 显示格式 |
minDate | string | '' | 最小值 |
maxDate | string | '' | 最大值 |
位置
成员 | 类型 | 默认值 | 说明 |
range | string | '500m' | 精确范围 |
displayMode | 'accurate' | 'arbitrary' | 'accurate' | 显示模式 accurate准确定位 arbitrary任意的 |
onChange | string | null | null | 变更事件 |
地址
成员 | 类型 | 默认值 | 说明 |
locationType | 'pp-cc-aa' | 'pp-cc' | 'pp' | 'pp-cc-aa' | 位置类型 |
addressDetail | string | 'true' | 是否显示详细地址 |
showEmpty | string | 'false' | 是否显示空选项 |
emptyValue | string | '请选择' | 空值 |
onChange | string | null | null | 变更事件 |
选人控件
成员 | 类型 | 默认值 | 说明 |
multi | boolean | false | 是否多选 |
deptVisible | string | 'all' | 可选类型,all组织和用户 user用户 org组织 |
defaultValue | any[] | null | null | 默认值 |
defaultValueType | string | '' | 默认值类型,originator创建人、originatorDept创建人部门、ref引用控件值 |
orgRoot | any[] | string | null | null | 组织根节点,数组:选定的值;字符串:值表达式 |
orgRootValueType | string | '' | 组织根节点值类型,同默认值类型 |
recursive | boolean | true | 递归的 |
roles | string | '' | 角色范围 |
mappings | string | '' | 映射关系 |
displayType | string | 'tag' | 显示类型,tag标签,text文本 |
关联表单
成员 | 类型 | 默认值 | 说明 |
schemaCode | string | '' | 业务模型 |
queryCode | string | '' | 查询列表编码 |
conditions | string | '' | 查询条件 |
mappings | string | '' | 映射关系 |
linkMode | boolean | true | 显示链接模式 |
isAuthorize | boolean | true | 是否临时授权 |
selectMode | string | true | 选择数据方式,popup弹出框,dropdown下拉框 |
选择类控件
共有属性
成员 | 类型 | 默认值 | 说明 |
name | string | '' | 控件名称 |
name_i18n | object | null | null | 多语言 |
visible | boolean | true | 是否可见 |
style | string | null | null | 控件样式 |
displayFormula | string | '' | 显示条件表达式 |
onChange | string | null | null | 变更事件 |
requiredFormula | string | '' | 必填条件表达式 |
defaultValue | string | '' | 默认值 |
options | string | '' | 选项 |
单选 & 复选
成员 | 类型 | 默认值 | 说明 |
direction | 'horizontal' | 'vertical' | 'horizontal' | 方向 horizontal 水平 vertical 垂直 |
下拉
成员 | 类型 | 默认值 | 说明 |
displayEmpty | boolean | true | 是否显示空选项 |
emptyValue | string | '请选择' | 空选项 |
multi | boolean | false | 是否多选 |
布局类控件
共有属性
成员 | 类型 | 默认值 | 说明 |
name | string | '' | 控件名称 |
align | 'left' | 'center' | 'right' | 'left' | 对齐 |
style | string | null | null | 控件样式 |
displayFormula | string | '' | 显示条件表达式 |
分组标题
成员 | 类型 | 默认值 | 说明 |
expand | boolean | true | 是否展开 |
系统控件
共有属性
成员 | 类型 | 默认值 | 说明 |
name | string | '' | 控件名称 |
name_i18n | object | null | null | 多语言 |
visible | boolean | true | 是否可见 |
style | string | null | null | 控件样式 |
单据号
成员 | 类型 | 默认值 | 说明 |
prefix | string | null | null | 流水号编码 |
maxLength | string | '6' | 最大长度 |
resetDate | string | 'YEAR' | 重置策略时间 'none' | 'YEAR' | 'MONTH' | 'DAY' |
创建时间
成员 | 类型 | 默认值 | 说明 |
format | string | 'YYYY-MM-DD' | 显示格式 |
上传类控件
共有属性
成员 | 类型 | 默认值 | 说明 |
name | string | '' | 控件名称 |
name_i18n | object | null | null | 多语言 |
visible | boolean | true | 是否可见 |
style | string | null | null | 控件样式 |
displayFormula | string | '' | 显示条件 |
requiredFormula | string | '' | 必填条件 |
limit | string | '5M' | 文件大小限制 |
batch | boolean | true | 是否可批量下载 |
附件
成员 | 类型 | 默认值 | 说明 |
fileTypes | string | null | null | 文件类型 |
onUpload | string | null | null | 上传附件事件 |
onDelete | string | null | null | 删除附件事件 |
图片
成员 | 类型 | 默认值 | 说明 |
number | 'batch' | 'unique' | 'batch' | 上传数量 单张 unique 多张 batch |
addWatermark | boolean | true | 是否添加水印 |
imageQuality | number | 50 | 图片质量30...100 |
compressible | boolean | false | 可压缩 |
onlyShoot | boolean | false | 是否只允许拍照 |
onUpload | string | null | null | 上传附件事件 |
onDelete | string | null | null | 删除附件事件 |
手写签名
成员 | 类型 | 默认值 | 说明 |
displayEnd | string | '移动端' | 显示端 |
审批意见
成员 | 类型 | 默认值 | 说明 |
showUpload | boolean | true | 是否可上传附件 |
fileTypes | string | null | null | 文件类型 |
defaultValue | string | null | null | 默认审批意见 |
showSignature | boolean | true | 手写签名 |
signatureIsRequired | boolean | false | 手写签名是否必填 |
子表
子表
成员 | 类型 | 默认值 | 说明 |
name | string | '' | 控件名称 |
name_i18n | object | null | null | 多语言 |
visible | boolean | true | 是否可见 |
style | string | null | null | 控件样式 |
rows | number | 2 | 默认行数 |
editable | boolean | true | 能否编辑 |
exportable | boolean | true | 能否导出 |
showTotal | boolean | false | 显示合计 |
displayFormula | string | '' | 显示条件表达式 |
onAddRow | string | null | null | 行新增事件 |
onDeleteRow | string | null | null | 行删除事件 |
mobileDisplayMode | string | 'page' | 移动端显示模式,waterfall瀑布,page分页,table二维 |
子表统计选项
成员 | 类型 | 默认值 | 说明 |
statisticMode | string | 'sum' | 统计模式,none不统计,sum求和,avg平均,min最小值,max最大值 |
format | string | 'integer' | 显示格式,参数控件API设置显示格式 |
关联查询(反向关联)
成员 | 类型 | 默认值 | 说明 |
name | string | '' | 控件名称 |
name_i18n | object | null | null | 多语言 |
visible | boolean | true | 是否可见 |
style | string | null | null | 控件样式 |
schemaCode | string | '' | 业务模型 |
fieldCode | string | '' | 关联字段 |
displayMode | string | 'list' | 显示模式,list列表,link链接 |
listCode | string | '' | 是否列表编码可批量下载 |
isAuthorize | boolean | true | 临时授权 |
-
有用(6)
-
没有用(0)