From e30d93a676d1d6739ee1737717a1db85084be3f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=B8=85?= Date: Fri, 14 Jun 2019 11:24:41 +0800 Subject: [PATCH] remove Decorator --- FormBasicForm/src/index.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/FormBasicForm/src/index.tsx b/FormBasicForm/src/index.tsx index 7d72bd86..f8b8b31f 100644 --- a/FormBasicForm/src/index.tsx +++ b/FormBasicForm/src/index.tsx @@ -27,10 +27,6 @@ interface PAGE_NAME_UPPER_CAMEL_CASEProps extends FormComponentProps { submitting: boolean; dispatch: Dispatch; } - -@connect(({ loading }: { loading: { effects: { [key: string]: boolean } } }) => ({ - submitting: loading.effects['BLOCK_NAME_CAMEL_CASE/submitRegularForm'], -})) class PAGE_NAME_UPPER_CAMEL_CASE extends Component { handleSubmit = (e: React.FormEvent) => { const { dispatch, form } = this.props; @@ -250,4 +246,8 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends Component()(PAGE_NAME_UPPER_CAMEL_CASE); +export default Form.create( + connect(({ loading }: { loading: { effects: { [key: string]: boolean } } }) => ({ + submitting: loading.effects['BLOCK_NAME_CAMEL_CASE/submitRegularForm'], + }))(PAGE_NAME_UPPER_CAMEL_CASE), +); -- GitLab