From 45b0be7f7efaf2d67a7a08affcd4f1530dd3b3bc Mon Sep 17 00:00:00 2001 From: lzdjack <51448229+lzdjack@users.noreply.github.com> Date: Tue, 31 Jan 2023 18:02:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=20=E4=BF=AE=E5=A4=8D=E8=A1=A8=E5=8D=95?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E7=BB=84=E4=BB=B6=E9=AA=8C=E8=AF=81?= =?UTF-8?q?=E4=B8=8D=E9=80=9A=E8=BF=87=E7=9A=84bug=20(#2510)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/component/useFormItem.ts | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/hooks/component/useFormItem.ts b/src/hooks/component/useFormItem.ts index cee415e88..1296bb14c 100644 --- a/src/hooks/component/useFormItem.ts +++ b/src/hooks/component/useFormItem.ts @@ -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( if (isEqual(value, defaultState.value)) return; innerState.value = value as T[keyof T]; - nextTick(() => { + setTimeout(() => { emit?.(changeEvent, value, ...(toRaw(unref(emitData)) || [])); }); },