Skip to content
On this page

表单 form

基本使用

表单校验

动态表单

自定义表单组件

更多好玩配置

API

form

submitOnReset
参数说明类型默认值
layout表单布局'horizontal'|'vertical'|'inline''horizontal'
initialValues预置字段默认值Object'--'
labelWidth标签宽度 固定宽度Number, String 0
schemas表单配置规则Array[]
baseRowStyle表单里内容 Row style样式Object--
baseColPropscol配置Object--
disabled表单禁用Booleanfalse
showActionButtonGroup是否显示操作按钮Booleanfalse
actionColOptions操作列Col配置Object--
showResetButton显示重置按钮Booleantrue
resetButtonOptions重置按钮配置Object--
showSubmitButton显示确认按钮Booleantrue
submitButtonOptions确认按钮配置Object--
resetFunc自定义重置函数Function--
submitFunc自定义确认函数Function--
submitOnReset是否点击重置执行初始化请求数据Booleanfalse
rowProps表单里内容 Row propsObject--

schemas

参数说明类型默认值
field字段名string--
label表单labelstring--
subLabel辅助 labelstring--
helpMessagelabel提示string | string[]--
labelWidthlabel宽度string | number--
disabledLabelWidth在formModel全局设置下禁用labelWidth的调整booleanfalse
component表单项对应的组件ant design 组件名称 例:Inputstring--
componentProps表单组件属性Object--
componentSlots表单组件slotsany--
required必填boolean | (renderCallbackParams) => boolean false
suffix后缀string | number | ((values) => string | number)--
rules规则Array--
loading组件加载状态booleanfalse
colPropscol配置外部的formModelItemObject--
defaultValue该表单默认值string | number--
spanspan配置Number--
vShow作用同v-showbooleantrue
vIf作用同v-ifbooleantrue
slotslot配置string--
dynamicDisabled动态禁用boolean | ((renderCallbackParams) => boolean)false
dynamicRules动态规则(renderCallbackParams) => Rule[]--

component-props

参数说明类型默认值
--所有ant design 表单组件的props----
request组件异步请求数据Function--
requestResult组件异步请求数据结果any--
style样式css所有--
vModelKey指定v-model绑定的keystringvalue

事件

事件名称说明回调参数
reset点击重置的回调(formModel) => void
submit点击确认的回调(formModel) => void

Released under the MIT License.