CreateForm 是在 sulaForm 基础上封装的模版,支持大多数的表单业务场景
提交、返回
(底部操作组),提交前会处理表单验证create
状态下,赋值前添加 loading、赋值后的 loading 消失表单配置
容器插件
表单提交
参数
用法
const config = {url: 'https://www.mocky.io/v2/5ed7a9d33200009abc274abe',method: 'get',};
表单模式
create: 创建模式;view: 查看模式;edit: 编辑模式
create
表单底部操作组配置
返回
默认 history.goBack(),也可配置事件
用法
const config = {back: ctx => {console.log(ctx);},};
自定义提交按钮属性
const config = {submitButtonProps: {children: '通过',},};
自定义返回按钮属性
const config = {backButtonProps: {children: '拒绝',type: 'danger',},};
其他属性参考 form
创建表单属性