luoawai
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
4 additions and
2 deletions
-
src/hooks/component/useFormItem.ts
|
|
|
@ -1,5 +1,5 @@ |
|
|
|
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)) || [])); |
|
|
|
}) |
|
|
|
}, |
|
|
|
}); |
|
|
|
|
|
|
|
|