Ben Lin
2024-06-18 9dfa701454d6a94690bad39dbb0e38f2a0b31489
src/components/Form/src/hooks/useAutoFocus.ts
@@ -1,5 +1,9 @@
import type { ComputedRef, Ref } from 'vue';
import type { FormSchema, FormActionType, FormProps } from '../types/form';
import {
  type FormSchemaInner as FormSchema,
  type FormActionType,
  type FormProps,
} from '../types/form';
import { unref, nextTick, watchEffect } from 'vue';
@@ -29,7 +33,7 @@
    const firstItem = schemas[0];
    // Only open when the first form item is input type
    if (!firstItem.component.includes('Input')) {
    if (!firstItem.component || !firstItem.component.includes('Input')) {
      return;
    }