Skip to content

表单容器

image

介绍

表单内容区域,内部可拖入表单组件。

API

Props

参数名描述类型默认值
status默认状态'default' | 'hide''default'
backgroundColor背景色'white' | 'transparent''transparent'
layout布局方式'horizontal' | 'vertical' | 'inline''horizontal'
size控件大小'large'|'medium'|'small'|'mini''medium'
labelWidth标签宽度string-
labelAlign标签对齐'left'|'right''right'
readonlyEmptyText只读状态无数据时默认文案'无'|'--''无'
baseStyle自定义样式 , 表格整体自定义样式string-
customClass类名绑定string-
width宽 , 布局容器宽度string-
height高 , 布局容器高度string-
opacity不透明度 , 布局容器背景色透明度string-
display显示, 设置组件的显示布局模式Display-
boxStyle盒模型, margin,border,padding设置BoxStyle-
borderRadius圆角BorderRadius-
boxShadow阴影BoxShadow-
uniqueKey唯一标识, 组件的唯一标识string-
scrollToFirstError验证失败后滚动到第一个错误字段booleanfalse
loop循环数据, 循环渲染设置Loop-

Events

事件名描述参数
onMounted挂载完成后执行ctx
onUnMounted实例被卸载之后调用ctx

Type

javascript

//显示
type Display = {
  type:"block"|"inline-block"|"inline"|"flex",
  // type选择flex可配置以下属性
  flex:{
    flexDirection:"row"|"column"|"row-reverse"|"column-reverse",
    alignItems:"flex-start"|"center"|"flex-end"|"stretch"|"base-line",
    justifyContent:"flex-start"|"center"|"flex-end"|"space-between"|"space-around"
  }
}

// 盒模型
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 BoxShadow = {
  "color":string,
  "hShadow":string,
  "vShadow":string,
  "blur":number,
}

// 圆角
type BorderRadius = {
  "topLeft":number,
  "topRight":number,
  "bottomLeft":number,
  "bottomRight":number,
}

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