fix: useForm ruleRef undefined warning #4881 (#4882), close #4881

Co-authored-by: candychuang <candychuang@tencent.com>
pull/4941/head
Candy 2021-11-27 16:47:26 +08:00 committed by GitHub
parent 8dfe7eed8b
commit 7df7d788f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,5 @@
import type { Ref } from 'vue'; import type { Ref } from 'vue';
import { reactive, watch, nextTick, unref, shallowRef, toRaw } from 'vue'; import { reactive, watch, nextTick, unref, shallowRef, toRaw, ref } from 'vue';
import cloneDeep from 'lodash-es/cloneDeep'; import cloneDeep from 'lodash-es/cloneDeep';
import intersection from 'lodash-es/intersection'; import intersection from 'lodash-es/intersection';
import isEqual from 'lodash-es/isEqual'; import isEqual from 'lodash-es/isEqual';
@ -92,7 +92,7 @@ function getPropByPath(obj: Props, path: string, strict: boolean) {
function useForm( function useForm(
modelRef: Props | Ref<Props>, modelRef: Props | Ref<Props>,
rulesRef?: Props | Ref<Props>, rulesRef: Props | Ref<Props> = ref({}),
options?: { options?: {
immediate?: boolean; immediate?: boolean;
deep?: boolean; deep?: boolean;