소스 검색

fix: 修复表单验证失败的多个错误提示,语法报错问题 (#2601)

luocong2016 2 년 전
부모
커밋
72dbe574d3
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      src/components/Form/src/hooks/useFormEvents.ts

+ 3 - 0
src/components/Form/src/hooks/useFormEvents.ts

@@ -314,6 +314,9 @@ export function useFormEvents({
       const res = handleFormValues(values);
       emit('submit', res);
     } catch (error: any) {
+      if (error?.outOfDate === false && error?.errorFields) {
+        return;
+      }
       throw new Error(error);
     }
   }