fix: 修复表单自定义组件验证不通过的bug (#2510)

This commit is contained in:
lzdjack 2023-01-31 18:02:53 +08:00 committed by GitHub
parent c999abb236
commit 45b0be7f7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 11 deletions

View File

@ -1,14 +1,5 @@
import type { UnwrapRef, Ref, WritableComputedRef, DeepReadonly } from 'vue';
import {
reactive,
readonly,
computed,
getCurrentInstance,
watchEffect,
unref,
nextTick,
toRaw,
} from 'vue';
import { reactive, readonly, computed, getCurrentInstance, watchEffect, unref, toRaw } from 'vue';
import { isEqual } from 'lodash-es';
@ -50,7 +41,7 @@ export function useRuleFormItem<T extends Recordable>(
if (isEqual(value, defaultState.value)) return;
innerState.value = value as T[keyof T];
nextTick(() => {
setTimeout(() => {
emit?.(changeEvent, value, ...(toRaw(unref(emitData)) || []));
});
},