未验证 提交 6b30c9f7 编写于 作者: L luoawai 提交者: GitHub

fix(useFormItem):修复ApiSelect的onChange事件获取不到第二个参数(#2592) (#2674)

上级 aedb8e53
import type { UnwrapRef, Ref, WritableComputedRef, DeepReadonly } from 'vue';
import { reactive, readonly, computed, getCurrentInstance, watchEffect, unref, toRaw } from 'vue';
import { reactive, readonly, computed, getCurrentInstance, watchEffect, unref, toRaw, nextTick } from 'vue';
import { isEqual } from 'lodash-es';
......@@ -41,7 +41,9 @@ export function useRuleFormItem<T extends Recordable>(
if (isEqual(value, defaultState.value)) return;
innerState.value = value as T[keyof T];
emit?.(changeEvent, value, ...(toRaw(unref(emitData)) || []));
nextTick(()=>{
emit?.(changeEvent, value, ...(toRaw(unref(emitData)) || []));
})
},
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册