Browse Source

perf(useRuleFormItem): more accurate return type (#1290)

pull/1301/head
pq 5 years ago
committed by GitHub
parent
commit
a0165d1eee
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      src/hooks/component/useFormItem.ts

9
src/hooks/component/useFormItem.ts

@ -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…
Cancel
Save