pq
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
8 additions and
1 deletions
-
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', |
|
|
|
|