Skip to content

子表单明细

image

介绍

用于子表明细数据录入,即“子表单的子表单”。其内可配置添加输入组件,支持输入框、单选框、日期选择、文件上传等类型

API

Props

参数名描述类型默认值
status默认状态'default' | 'readonly' | 'hide''default'
title标题string-
showLabel显示标题booleantrue
value编辑默认值Array<Record<string, any>>-
labelWidth标签宽度number-
name数据字段string${组件编码}_${长度为8的随机字符串}
showIndexCol显示序号booleanfalse
rowDraggable拖动排序booleanfalse
fixedLeft冻结左侧列0|1|20
maxCount最大条数nunmber-
showAddBtn新增按钮booleantrue
showActionCol显示操作列booleantrue
actionColWidth操作列宽度number80
showCopyBtn复制booleantrue
copyType复制位置"next"|"bottom""bottom"
showRemoveBtn删除booleantrue
validate校验Validate-
baseStyle自定义样式 , 表格整体自定义样式string-
customClass类名绑定string-
boxStyle盒模型, margin,border,padding设置BoxStyle-
uniqueKey唯一标识, 组件的唯一标识string-
tip气泡提醒string-
loop循环数据, 循环渲染设置Loop-

Props 字段列

参数名描述类型默认值
type数据编辑格式-数据类型,'input'|'select'|'treeSelect'|'inputNumber'
|'date'|'time'|'switch'|'uploadFile'
string'input'
colType数据展示类型,'text'|'custom'string'input'
renderFunc自定义展示配置function-
show是否回显booleantrue
title标题string-
name数据字段string-
placeholder占位提示string'请输入'|'请选择'
width列宽number-
searchDelay搜索时间延迟时间,单位msnumber500
disabled禁用booleanfalse
required必填booleanfalse
requiredMsg必填错误提示string-
customValidate自定义校验booleanfalse
customValidateFunc自定义校验函数function-
append后置按钮booleanfalse
appendType后置类型,'text'|'icon'string'text'
appendText后置标签文字string-
appendIcon后置图标string-
options选项数据Array<Record<string, string|number>>-
fieldNames指定字段名{ key: string, title: string, children?: string }{key: 'key', title: 'value', children: 'children'}
multiple多选booleanfalse
maxTagCount最大显示数量number-
allowSearch可搜索booleanfalse
filterOption是否过滤选项booleanfalse
filterTreeNode过滤函数function-
loading是否为加载中状态booleanfalse
isLoadMore开启异步加载booleanfalse
loadMore异步加载函数function-
precision数字精度number-
min最小值number-
max最大值number-
dateType选择器类型,'date'|'week'|'month'|'quarter'|'year'string'date'
format格式,'YYYY-MM-DD'|'YYYY-MM-DD HH'|'YYYY-MM-DD HH:mm'|'YYYY-MM-DD HH:mm:ss'string'YYYY-MM-DD'
isRangeSelect范围选择booleanfalse
disabledDate不可选取的时间function-
hideDisabledOptions隐藏禁止选择的选项booleanfalse
disabledHours禁用的小时选项Array<number>-
disabledMinutes禁用的分钟选项Array<number>-
disabledSeconds禁用的秒数选项Array<number>-
switchType类型,'circle'|'round'|'line'string'circle'
fileName上传文件名,'file'|'files'string'files'
valueFormat默认值数据格式,'default'|'object'string'default'
extraData额外数据function-
setUrl文件预览地址function-
btnTitle按钮内容string-
btnType按钮类型,'primary'|'default'|'outline'string'default'
directory文件夹上传booleanfalse
maxFileNum最大上传文件个数number6
maxFileSize单文件最大上传大小(MB)number20
withCredentials是否允许请求cookiebooleanfalse
autoUpload自动上传booleantrue
accept上传文件类型string-
enablePreview开启预览booleanfalse
previewEvent预览事件function-
enableDownload开启下载booleantrue
downloadEvent下载事件function-

Events

事件名描述参数
onChange值变化时调用ctx:PangeaContext
params:{ value: any }
loop:LoopParams

Type

javascript

// 校验配置信息
type Validate = {
	"required": boolean,
	"min": boolean,
	"requiredMsg": string,
	"minLength": number,
	"minMsg": string
}

// 盒模型
type BoxStyle = {
  "marigin": [string|string|string|string],
  "border": [string|string|string|string],
  "padding": [string|string|string|string],
  "borderColor": 'color-border-1'|'color-border-2'|'color-border-3'|'color-border-4',
  "borderStyle": 'solid'|'dotted'|'dashed'
}

// 循环
type Loop = {
  "data": any[],
  "paramName": string,
  "indexName": string,
  "key": string
}

// 循环变量数据参数
type LoopParams = {
  "indexName":string,
  "paramName":string,
  "ref":ComputedRefImpl, // 全部的循环变量数据
  "row":any,
  "rowIndex":number
}[]