Commit 72dbe574d3dc66056a2a660952f0bc7ce49b8162

Authored by luocong2016
Committed by GitHub
1 parent 4c91ac11

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

src/components/Form/src/hooks/useFormEvents.ts
@@ -314,6 +314,9 @@ export function useFormEvents({ @@ -314,6 +314,9 @@ export function useFormEvents({
314 const res = handleFormValues(values); 314 const res = handleFormValues(values);
315 emit('submit', res); 315 emit('submit', res);
316 } catch (error: any) { 316 } catch (error: any) {
  317 + if (error?.outOfDate === false && error?.errorFields) {
  318 + return;
  319 + }
317 throw new Error(error); 320 throw new Error(error);
318 } 321 }
319 } 322 }