fix: form support disabledOnInputListener (#5127)

* fix: form support `disabledOnInputListener`

* chore: docs update
This commit is contained in:
Netfan
2024-12-13 11:18:45 +08:00
committed by GitHub
parent 1d3729aa24
commit be208fe915
6 changed files with 24 additions and 4 deletions

View File

@@ -14,6 +14,8 @@ setupVbenForm<ComponentType>({
Upload: 'fileList',
CheckboxGroup: 'model-value',
},
// select等组件的筛选功能会抛出input事件需要禁用表单的input事件监听以免错误地更新了组件值
disabledOnInputListener: true,
},
defineRules: {
required: (value, _params, ctx) => {

View File

@@ -139,6 +139,7 @@ const [Form, formApi] = useVbenForm({
fieldName: 'select',
label: 'Select',
componentProps: {
filterable: true,
options: [
{ value: 'A', label: '选项A' },
{ value: 'B', label: '选项B' },