style: add error data throw if occur VALIDATION_ERROR

pull/146/head
moonrailgun 2 years ago
parent 8f3ec1c996
commit 70151af0bb

@ -62,6 +62,8 @@ function createRequest() {
errorMsg = t('请求参数校验失败');
if (Array.isArray(responseData.data)) {
console.error(JSON.stringify(responseData.data));
try {
errorMsg += `: ${responseData.data
.map((item: any) => item.field)

@ -9,7 +9,6 @@ import {
import { useAsyncRequest } from '../useAsyncRequest';
import { useMemoizedFn } from '../useMemoizedFn';
import _without from 'lodash/without';
import { useState } from 'react';
/**
* hooks

Loading…
Cancel
Save