From dbca0b41fd73aa301fab45361601ed2ab7b67ac8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=B8=85?= Date: Sun, 5 May 2019 09:48:44 +0800 Subject: [PATCH] use new from tpye --- .stylelintrc.json | 7 +++++-- AccountSettings/src/components/base.tsx | 2 +- AdvancedForm/src/index.tsx | 2 +- BasicForm/src/index.tsx | 2 +- BasicList/src/index.tsx | 2 +- SearchListApplications/src/index.tsx | 2 +- SearchListArticles/src/index.tsx | 2 +- SearchListProjects/src/index.tsx | 2 +- TableList/src/index.tsx | 2 +- UserLogin/src/components/Login/index.tsx | 3 ++- UserLogin/src/index.tsx | 1 + UserRegister/src/index.tsx | 2 +- 12 files changed, 17 insertions(+), 12 deletions(-) diff --git a/.stylelintrc.json b/.stylelintrc.json index b533bdd6..ad112f11 100644 --- a/.stylelintrc.json +++ b/.stylelintrc.json @@ -1,9 +1,12 @@ { - "extends": ["stylelint-config-standard", "stylelint-config-prettier"], + "extends": [ + "stylelint-config-standard", + "stylelint-config-prettier" + ], "rules": { "declaration-empty-line-before": null, "no-descending-specificity": null, "selector-pseudo-class-no-unknown": null, "selector-pseudo-element-colon-notation": null } -} +} \ No newline at end of file diff --git a/AccountSettings/src/components/base.tsx b/AccountSettings/src/components/base.tsx index da55cc64..e8154c67 100644 --- a/AccountSettings/src/components/base.tsx +++ b/AccountSettings/src/components/base.tsx @@ -206,4 +206,4 @@ class BaseView extends Component { } } -export default Form.create()(BaseView); +export default Form.create()(BaseView); diff --git a/AdvancedForm/src/index.tsx b/AdvancedForm/src/index.tsx index 64719f2a..6c5385c7 100644 --- a/AdvancedForm/src/index.tsx +++ b/AdvancedForm/src/index.tsx @@ -330,4 +330,4 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends Component()(PAGE_NAME_UPPER_CAMEL_CASE); diff --git a/BasicForm/src/index.tsx b/BasicForm/src/index.tsx index 4f066cac..10b3c632 100644 --- a/BasicForm/src/index.tsx +++ b/BasicForm/src/index.tsx @@ -253,4 +253,4 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends Component()(PAGE_NAME_UPPER_CAMEL_CASE); diff --git a/BasicList/src/index.tsx b/BasicList/src/index.tsx index 1da98f5c..a805d59e 100644 --- a/BasicList/src/index.tsx +++ b/BasicList/src/index.tsx @@ -377,4 +377,4 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends Component< } } -export default Form.create()(PAGE_NAME_UPPER_CAMEL_CASE); +export default Form.create()(PAGE_NAME_UPPER_CAMEL_CASE); diff --git a/SearchListApplications/src/index.tsx b/SearchListApplications/src/index.tsx index 4a0c3e47..af78fcd0 100644 --- a/SearchListApplications/src/index.tsx +++ b/SearchListApplications/src/index.tsx @@ -173,7 +173,7 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends Component({ onValuesChange({ dispatch }: PAGE_NAME_UPPER_CAMEL_CASEProps, changedValues, allValues) { // 表单项变化时请求数据 // 模拟查询表单生效 diff --git a/SearchListArticles/src/index.tsx b/SearchListArticles/src/index.tsx index 4399de0c..094a3b35 100644 --- a/SearchListArticles/src/index.tsx +++ b/SearchListArticles/src/index.tsx @@ -234,7 +234,7 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends Component({ onValuesChange({ dispatch }: PAGE_NAME_UPPER_CAMEL_CASEProps, changedValues, allValues) { // 表单项变化时请求数据 // 模拟查询表单生效 diff --git a/SearchListProjects/src/index.tsx b/SearchListProjects/src/index.tsx index 07599c0e..becd1949 100644 --- a/SearchListProjects/src/index.tsx +++ b/SearchListProjects/src/index.tsx @@ -142,7 +142,7 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends Component({ onValuesChange({ dispatch }: PAGE_NAME_UPPER_CAMEL_CASEProps, changedValues, allValues) { // 表单项变化时请求数据 // 模拟查询表单生效 diff --git a/TableList/src/index.tsx b/TableList/src/index.tsx index 4992f2c6..6dc6c2b7 100644 --- a/TableList/src/index.tsx +++ b/TableList/src/index.tsx @@ -478,4 +478,4 @@ class TableList extends Component { } } -export default Form.create()(TableList); +export default Form.create()(TableList); diff --git a/UserLogin/src/components/Login/index.tsx b/UserLogin/src/components/Login/index.tsx index 289f2fbf..38de8682 100644 --- a/UserLogin/src/components/Login/index.tsx +++ b/UserLogin/src/components/Login/index.tsx @@ -146,8 +146,9 @@ class Login extends Component { ); } } + (Object.keys(LoginItem) as Array).forEach(item => { Login[item] = LoginItem[item]; }); -export default (Form.create()(Login as any) as unknown) as typeof Login; +export default Form.create>()(Login); diff --git a/UserLogin/src/index.tsx b/UserLogin/src/index.tsx index c22c8e6b..9446bb48 100644 --- a/UserLogin/src/index.tsx +++ b/UserLogin/src/index.tsx @@ -9,6 +9,7 @@ import { Dispatch } from 'redux'; import { IStateType } from './model'; import { FormComponentProps } from 'antd/lib/form'; import { CheckboxChangeEvent } from 'antd/lib/checkbox'; + const { Tab, UserName, Password, Mobile, Captcha, Submit } = Login; interface BLOCK_NAME_CAMEL_CASEProps { diff --git a/UserRegister/src/index.tsx b/UserRegister/src/index.tsx index 61e54086..808c837d 100644 --- a/UserRegister/src/index.tsx +++ b/UserRegister/src/index.tsx @@ -366,4 +366,4 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends Component< } } -export default Form.create()(PAGE_NAME_UPPER_CAMEL_CASE); +export default Form.create()(PAGE_NAME_UPPER_CAMEL_CASE); -- GitLab