Commit 11e7f523 authored by XieZhiXiong's avatar XieZhiXiong

fix: 修复hooks在非函数组件外调用报错的问题

parent 8cc322b5
......@@ -6,6 +6,7 @@
* @Description:
*/
import { FormEffectHooks, FormPath, IFormActions } from '@formily/antd';
import { getIntl } from 'umi';
import moment from 'moment';
import { useLinkageUtils } from '@/utils/formEffectUtils';
import {
......@@ -23,7 +24,6 @@ import {
SUITABLE_TYPE_NEW_MEMBER,
SUITABLE_TYPE_OLD_MEMBER,
} from '@/constants/marketing';
import { useIntl} from 'umi'
const {
onFieldInputChange$,
......@@ -32,7 +32,7 @@ const {
export const useBusinessEffects = (context, actions: IFormActions) => {
const { getFieldValue, setFieldState, setFieldValue, getFieldState } = actions;
const intl = useIntl();
const intl = getIntl();
const linkage = useLinkageUtils();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment