Skip to content

Form 属性文档

概览

参数说明类型可选值默认值
modelValue/v-model绑定值object--
option表单配置项参考Option配置object--
upload-beforeupload组件上传前的回调,done用于继续图片上传,loading用于中断操作function-(file,done,loading)=>{}
upload-afterupload组件上传后的回调,done用于结束操作,loading用于中断操作function-(res,done)=>{}
upload-deleteupload组件删除文件之前的钩子,参数为上传的文件和文件列表,若返回 false 或者返回 Promise 且被 reject,则停止删除function-(file,column)=>{}
upload-previewupload组件查看回调function-(file,column,done)=>{}
upload-errorupload组件上传失败错误回调function-(error,column)=>{}
upload-exceedupload组件上传超过长度限制回调function-(limit,files,fileList,column)=>{}

Option

参数说明类型可选值默认值
size组件的尺寸numbermedium/small/minismall
column表单列配置参考Column相关配置array--
labelWidth标题宽度string-80
labelPosition标题位置stringleft/right/topleft
labelSuffix标题的后缀string-:
enter回车按键触发提交表单boolean-false
group分组表单array--
tabs选项卡表单(前提要配置group)boolean-false
menuBtn表单操作栏是否显示boolean-true
menuSpan表单操作菜单栅格占据的列数number-24
menuPosition表单操作菜单的位置stringleft/center/rightcenter
submitBtn提交按钮boolean-true
submitText提交按钮文案string-提交
emptyBtn清空按钮boolean-true
emptyText清空按钮文案string-清空

Column-共用属性

参数说明类型可选值默认值
label标签文本的内容string
prop标签文本的内容属性名称string-
control字段控制器function-
bind深结构数据绑定值string-
rules验证规则object-
value初始化默认值---
disabled禁用booleanfalse
order位置排序,数字越大位置越靠前number-
size组件的尺寸numbermedium/small/minismall
span栅格占据的列数number-12
gutter栅格间隔number-0
offset栅格左侧的间隔格数number-0
push栅格向右移动格数number-0
pull栅格向左移动格数number-0
row栅格后面的内容是否从新的一行开始展示boolean-false
display栅格显示boolean-true
labelWidth标题宽度string-80
labelPosition标题位置stringleft/right/topleft
tip内容提示辅助语string--
tipPlacement内容提示辅助语位置stringtop/top-start/top-end/bottom/bottom-start/bottom-end/left/left-start/left-end/right/right-start/right-endtop
labelTip标题提示辅助语string--
labelTipPlacement标题提示辅助语位置stringtop/top-start/top-end/bottom/bottom-start/bottom-end/left/left-start/left-end/right/right-start/right-endtop

以下是你提供的内容转换成Markdown格式:

Column-字典属性

参数说明类型可选值默认值
props数据字典属性的配置对象,具体参考Props参考配置object
dicData数据字典值array
dicUrl数据字典接口url地址string
dicQuery数据字典接口url携带请求参数object
dicHeaders数据字典接口url携带头部参数object
dicFormatter数据字典接口url返回数据格式化方法function(res)=>
dicMethod数据字典接口请求方式string

Column-Props

参数说明类型可选值默认值
label选项标签为选项对象的某个属性值stringlabel
value选项的值为选项对象的某个属性值stringvalue
children选项的子选项为选项对象的某个属性值stringchildren
disabled选项的禁用为选项对象的某个属性值stringdisabled
res选项返回结构的层级(例如data.data)string-

Column-Input

参数说明类型可选值默认值
placeholder输入框占位文本string-请输入/请选择+label名称
clearable是否可清空boolean-true
readonly是否只读boolean--
blur在失去焦点时触发function-({column,value})=>{}
focus在获得焦点时触发function-({column,value})=>{}
change值改变的时触发function-({column,value})=>{}
click点击时触发boolean-({column,value})=>{}
maxlength原生属性,最大输入长度number--
minlength原生属性,最小输入长度number--
prefixIcon输入框头部图标string--
suffixIcon输入框尾部图标number--
showPassword是否显示切换密码图标boolean-true
rows输入框行数,只对 type="textarea" 有效number-2
minRows输入框行最小行数,只对 type="textarea" 有效number-2
maxRows输入框行最大行数,只对 type="textarea" 有效number-6