feat: add submitOnChange props to vben form (#5032)

This commit is contained in:
huangxiaomin
2024-12-05 11:23:21 +08:00
committed by GitHub
parent 05b4b61c6e
commit fe236ea929
6 changed files with 23 additions and 1 deletions

View File

@@ -316,6 +316,7 @@ useVbenForm 返回的第二个参数,是一个对象,包含了一些表单
| commonConfig | 表单项的通用配置,每个配置都会传递到每个表单项,表单项可覆盖 | `FormCommonConfig` | - |
| schema | 表单项的每一项配置 | `FormSchema` | - |
| submitOnEnter | 按下回车健时提交表单 | `boolean` | false |
| submitOnChange | 字段值改变时提交表单 | `boolean` | false |
### TS 类型说明

View File

@@ -76,6 +76,8 @@ const formOptions: VbenFormProps = {
submitButtonOptions: {
content: '查询',
},
// 是否在字段值改变时提交表单
submitOnChange: false,
// 按下回车时是否提交表单
submitOnEnter: false,
};