perf(useRuleFormItem): more accurate return type (#1290)
This commit is contained in:
parent
8447331197
commit
a0165d1eee
|
|
@ -1,4 +1,4 @@
|
|||
import type { UnwrapRef, Ref } from 'vue';
|
||||
import type { UnwrapRef, Ref, WritableComputedRef, DeepReadonly } from 'vue';
|
||||
import {
|
||||
reactive,
|
||||
readonly,
|
||||
|
|
@ -12,6 +12,13 @@ import {
|
|||
|
||||
import { isEqual } from 'lodash-es';
|
||||
|
||||
export function useRuleFormItem<T extends Recordable, K extends keyof T, V = UnwrapRef<T[K]>>(
|
||||
props: T,
|
||||
key?: K,
|
||||
changeEvent?,
|
||||
emitData?: Ref<any[]>,
|
||||
): [WritableComputedRef<V>, (val: V) => void, DeepReadonly<V>];
|
||||
|
||||
export function useRuleFormItem<T extends Recordable>(
|
||||
props: T,
|
||||
key: keyof T = 'value',
|
||||
|
|
|
|||
Loading…
Reference in New Issue