Netfan
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
4 additions and
1 deletions
-
packages/@core/ui-kit/form-ui/src/vben-use-form.vue
|
|
|
@ -6,7 +6,7 @@ import type { ExtendedFormApi, VbenFormProps } from './types'; |
|
|
|
import { useForwardPriorityValues } from '@vben-core/composables'; |
|
|
|
// import { isFunction } from '@vben-core/shared/utils'; |
|
|
|
|
|
|
|
import { useTemplateRef, watch } from 'vue'; |
|
|
|
import { toRaw, useTemplateRef, watch } from 'vue'; |
|
|
|
|
|
|
|
import { useDebounceFn } from '@vueuse/core'; |
|
|
|
|
|
|
|
@ -62,6 +62,9 @@ function handleKeyDownEnter(event: KeyboardEvent) { |
|
|
|
watch( |
|
|
|
() => form.values, |
|
|
|
useDebounceFn(() => { |
|
|
|
(props.handleValuesChange ?? state.value.handleValuesChange)?.( |
|
|
|
toRaw(form.values), |
|
|
|
); |
|
|
|
state.value.submitOnChange && props.formApi?.submitForm(); |
|
|
|
}, 300), |
|
|
|
{ deep: true }, |
|
|
|
|