diff --git a/src/pages/Account/Center/Applications.js b/src/pages/Account/Center/Applications.js index 54d1ff87590408581520ed1d2c77b6e34d239aca..513f60448f4fb05eafbe128aab5e878706b1ea0e 100644 --- a/src/pages/Account/Center/Applications.js +++ b/src/pages/Account/Center/Applications.js @@ -5,7 +5,6 @@ import { connect } from 'dva'; import { formatWan } from '@/utils/utils'; import stylesApplications from '../../List/Applications.less'; -export default @connect(({ list }) => ({ list, })) @@ -85,3 +84,5 @@ class Center extends PureComponent { ); } } + +export default Center; diff --git a/src/pages/Account/Center/Articles.js b/src/pages/Account/Center/Articles.js index fb42f2a9216a97896efc64e6bd914e53186d412e..27b90d0a33090bad1edb6623fcc253172b9db2ef 100644 --- a/src/pages/Account/Center/Articles.js +++ b/src/pages/Account/Center/Articles.js @@ -5,7 +5,6 @@ import { connect } from 'dva'; import stylesArticles from '../../List/Articles.less'; import styles from './Articles.less'; -export default @connect(({ list }) => ({ list, })) @@ -68,3 +67,5 @@ class Center extends PureComponent { ); } } + +export default Center; diff --git a/src/pages/Account/Center/Projects.js b/src/pages/Account/Center/Projects.js index c4e389ab7a7ef33002c8b9a94c524e0f0d543a4f..ac749fdb58a75ab9003660444bcc191a1f83fcda 100644 --- a/src/pages/Account/Center/Projects.js +++ b/src/pages/Account/Center/Projects.js @@ -5,7 +5,6 @@ import { connect } from 'dva'; import AvatarList from '@/components/AvatarList'; import stylesProjects from '../../List/Projects.less'; -export default @connect(({ list }) => ({ list, })) @@ -49,3 +48,5 @@ class Center extends PureComponent { ); } } + +export default Center; diff --git a/src/pages/Account/Settings/BaseView.js b/src/pages/Account/Settings/BaseView.js index 42952d1d1b944280090280b717fe86257dc061bd..39e90766da934c54c454a84f64c4d15a88ebd593 100644 --- a/src/pages/Account/Settings/BaseView.js +++ b/src/pages/Account/Settings/BaseView.js @@ -186,4 +186,5 @@ class BaseView extends Component { ); } } + export default BaseView; diff --git a/src/pages/Account/Settings/BindingView.js b/src/pages/Account/Settings/BindingView.js index 1080e3505c09b6414e1a634752f6631b8eefbd16..29a29890ca0d5ab339f872f1fe614ff9b0122ea4 100644 --- a/src/pages/Account/Settings/BindingView.js +++ b/src/pages/Account/Settings/BindingView.js @@ -56,4 +56,5 @@ class BindingView extends Component { ); } } + export default BindingView; diff --git a/src/pages/Account/Settings/GeographicView.js b/src/pages/Account/Settings/GeographicView.js index 8d6925cd207190473c8513045a45df1acd69bb7f..d33cb13871d39ef38ad986013339200c072b2d64 100644 --- a/src/pages/Account/Settings/GeographicView.js +++ b/src/pages/Account/Settings/GeographicView.js @@ -10,7 +10,6 @@ const nullSlectItem = { key: '', }; -export default @connect(({ geographic }) => { const { province, isLoading, city } = geographic; return { @@ -125,3 +124,5 @@ class GeographicView extends PureComponent { ); } } + +export default GeographicView; diff --git a/src/pages/Account/Settings/Info.js b/src/pages/Account/Settings/Info.js index ab7edaf9627aa6be44fc55f96ef7143ac0ed30e0..ceee506b8bc5c5569d838f95f1d9cb051dbd2f26 100644 --- a/src/pages/Account/Settings/Info.js +++ b/src/pages/Account/Settings/Info.js @@ -8,7 +8,6 @@ import styles from './Info.less'; const { Item } = Menu; -export default @connect(({ user }) => ({ currentUser: user.currentUser, })) @@ -122,3 +121,5 @@ class Info extends Component { ); } } + +export default Info; diff --git a/src/pages/Account/Settings/NotificationView.js b/src/pages/Account/Settings/NotificationView.js index 818629451d91f46bd680d41cc539f2579726acf4..96677bbd269501cb9e901ea0f30b58ed2e51d774 100644 --- a/src/pages/Account/Settings/NotificationView.js +++ b/src/pages/Account/Settings/NotificationView.js @@ -46,4 +46,5 @@ class NotificationView extends Component { ); } } + export default NotificationView; diff --git a/src/pages/Account/Settings/SecurityView.js b/src/pages/Account/Settings/SecurityView.js index 4075a312e1a9d3b4353a42e09d983d8dd743f42f..0706bd0b9b2988bb41bcc2a3fe9ab20f65f6bf16 100644 --- a/src/pages/Account/Settings/SecurityView.js +++ b/src/pages/Account/Settings/SecurityView.js @@ -98,4 +98,5 @@ class SecurityView extends Component { ); } } + export default SecurityView; diff --git a/src/pages/Exception/TriggerException.js b/src/pages/Exception/TriggerException.js index 1f561ee630a61cfe798b73867775077b08ea3421..15ace510f674c22a9ab0b35cc624f53ce0ff676b 100644 --- a/src/pages/Exception/TriggerException.js +++ b/src/pages/Exception/TriggerException.js @@ -3,7 +3,6 @@ import { Button, Spin, Card } from 'antd'; import { connect } from 'dva'; import styles from './style.less'; -export default @connect(state => ({ isloading: state.error.isloading, })) @@ -47,3 +46,5 @@ class TriggerException extends PureComponent { ); } } + +export default TriggerException; diff --git a/src/pages/Forms/BasicForm.js b/src/pages/Forms/BasicForm.js index 9040ccea445be9a192c578e14596354cf41392b0..12eca38f10801c130fee32efe483c9c8b7a0de04 100644 --- a/src/pages/Forms/BasicForm.js +++ b/src/pages/Forms/BasicForm.js @@ -20,7 +20,6 @@ const { Option } = Select; const { RangePicker } = DatePicker; const { TextArea } = Input; -export default @connect(({ loading }) => ({ submitting: loading.effects['form/submitRegularForm'], })) @@ -201,3 +200,5 @@ class BasicForms extends PureComponent { ); } } + +export default BasicForms; diff --git a/src/pages/Forms/StepForm/Step1.js b/src/pages/Forms/StepForm/Step1.js index 1be5d66123cb88403a7d4836c27b6b089026ebb8..a62e294192b1cfcc74ef3ee5f817d005d05f22a2 100644 --- a/src/pages/Forms/StepForm/Step1.js +++ b/src/pages/Forms/StepForm/Step1.js @@ -15,7 +15,6 @@ const formItemLayout = { }, }; -export default @connect(({ form }) => ({ data: form.step, })) @@ -112,3 +111,5 @@ class Step1 extends React.PureComponent { ); } } + +export default Step1; diff --git a/src/pages/Forms/StepForm/Step2.js b/src/pages/Forms/StepForm/Step2.js index fb6ad480993ab38dd38ef09227feb7036ef38a73..3e3b05bf2fe769c3994829ffff059844cb0f7146 100644 --- a/src/pages/Forms/StepForm/Step2.js +++ b/src/pages/Forms/StepForm/Step2.js @@ -14,6 +14,10 @@ const formItemLayout = { }, }; +@connect(({ form, loading }) => ({ + submitting: loading.effects['form/submitStepForm'], + data: form.step, +})) @Form.create() class Step2 extends React.PureComponent { render() { @@ -92,7 +96,4 @@ class Step2 extends React.PureComponent { } } -export default connect(({ form, loading }) => ({ - submitting: loading.effects['form/submitStepForm'], - data: form.step, -}))(Step2); +export default Step2; diff --git a/src/pages/Forms/StepForm/Step3.js b/src/pages/Forms/StepForm/Step3.js index 4004c3990fa2472daedc976ebacf40135754d2ba..74e1a6b8add060d063a141f905976c80effbb2ab 100644 --- a/src/pages/Forms/StepForm/Step3.js +++ b/src/pages/Forms/StepForm/Step3.js @@ -5,7 +5,6 @@ import router from 'umi/router'; import Result from '@/components/Result'; import styles from './style.less'; -export default @connect(({ form }) => ({ data: form.step, })) @@ -71,3 +70,5 @@ class Step3 extends React.PureComponent { ); } } + +export default Step3; diff --git a/src/pages/Forms/TableForm.js b/src/pages/Forms/TableForm.js index fad77137262cda039221907d29939a7a6c93637e..ae2723e7ba4eea80351d5a3d772fba89404e2c5c 100644 --- a/src/pages/Forms/TableForm.js +++ b/src/pages/Forms/TableForm.js @@ -3,7 +3,7 @@ import { Table, Button, Input, message, Popconfirm, Divider } from 'antd'; import isEqual from 'lodash/isEqual'; import styles from './style.less'; -export default class TableForm extends PureComponent { +class TableForm extends PureComponent { index = 0; cacheOriginData = {}; @@ -257,3 +257,5 @@ export default class TableForm extends PureComponent { ); } } + +export default TableForm; diff --git a/src/pages/List/Applications.js b/src/pages/List/Applications.js index 4d0871fee86da0dd7caa7108b8c7d3b1612a8df4..62d467438ad4066b626a6fec4bfa43b60ebaca48 100644 --- a/src/pages/List/Applications.js +++ b/src/pages/List/Applications.js @@ -12,7 +12,6 @@ import styles from './Applications.less'; const { Option } = Select; const FormItem = Form.Item; -export default @Form.create() @connect(({ list, loading }) => ({ list, @@ -193,3 +192,5 @@ class FilterCardList extends PureComponent { ); } } + +export default FilterCardList; diff --git a/src/pages/List/Articles.js b/src/pages/List/Articles.js index a9a8c0f56b0e01e5b400f5b2c32425d6c01cf3ad..0aec03c841d0a1c5b9423d11d35be7e1a93f846d 100644 --- a/src/pages/List/Articles.js +++ b/src/pages/List/Articles.js @@ -12,7 +12,6 @@ const FormItem = Form.Item; const pageSize = 5; -export default @Form.create() @connect(({ list, loading }) => ({ list, @@ -240,3 +239,5 @@ class SearchList extends Component { ); } } + +export default SearchList; diff --git a/src/pages/List/BasicList.js b/src/pages/List/BasicList.js index 9e4e3ee2dfd47fe54445132c78be42754e5710ad..b52a29999b999571e70e19c01c60699395d97acd 100644 --- a/src/pages/List/BasicList.js +++ b/src/pages/List/BasicList.js @@ -32,7 +32,6 @@ const RadioGroup = Radio.Group; const SelectOption = Select.Option; const { Search, TextArea } = Input; -export default @connect(({ list, loading }) => ({ list, loading: loading.models.list, @@ -337,3 +336,5 @@ class BasicList extends PureComponent { ); } } + +export default BasicList; diff --git a/src/pages/List/CardList.js b/src/pages/List/CardList.js index f7a04ebf983d905ad1c59b18cf8baf30d422924e..03f799a14feb9d70ec47a9ad7fcaf739123d2ae4 100644 --- a/src/pages/List/CardList.js +++ b/src/pages/List/CardList.js @@ -7,7 +7,6 @@ import PageHeaderWrapper from '@/components/PageHeaderWrapper'; import styles from './CardList.less'; -export default @connect(({ list, loading }) => ({ list, loading: loading.models.list, @@ -98,3 +97,5 @@ class CardList extends PureComponent { ); } } + +export default CardList; diff --git a/src/pages/List/List.js b/src/pages/List/List.js index 9662df0a5e6f7a6804f128df783b365212b84974..18ac75692c2fdb1e011eace468ad9d557213a7e3 100644 --- a/src/pages/List/List.js +++ b/src/pages/List/List.js @@ -4,7 +4,6 @@ import { connect } from 'dva'; import { Input } from 'antd'; import PageHeaderWrapper from '@/components/PageHeaderWrapper'; -export default @connect() class SearchList extends Component { handleTabChange = key => { @@ -72,3 +71,5 @@ class SearchList extends Component { ); } } + +export default SearchList; diff --git a/src/pages/List/Projects.js b/src/pages/List/Projects.js index e36cbdc2cf463443b9d78ff17b9a71cfbf4b0ffc..e2821754c38064a6b586b83b0e3226920e26b841 100644 --- a/src/pages/List/Projects.js +++ b/src/pages/List/Projects.js @@ -14,7 +14,7 @@ const { Option } = Select; const FormItem = Form.Item; /* eslint react/no-array-index-key: 0 */ -export default + @Form.create() @connect(({ list, loading }) => ({ list, @@ -163,3 +163,5 @@ class CoverCardList extends PureComponent { ); } } + +export default CoverCardList; diff --git a/src/pages/List/TableList.js b/src/pages/List/TableList.js index 7e4d985ddd4e0a2c20795f31e8b7da5e7a9dc188..1853dab6bb19e41800b60ffac235c335ee48a0f8 100644 --- a/src/pages/List/TableList.js +++ b/src/pages/List/TableList.js @@ -266,7 +266,6 @@ class UpdateForm extends PureComponent { } /* eslint react/no-multi-comp:0 */ -export default @connect(({ rule, loading }) => ({ rule, loading: loading.models.rule, @@ -672,3 +671,5 @@ class TableList extends PureComponent { ); } } + +export default TableList; diff --git a/src/pages/Profile/AdvancedProfile.js b/src/pages/Profile/AdvancedProfile.js index 4ee9af2e8e22c85558889980e465c0f43162e98d..0006f993af920de30a7921cbbd2d2a9af74e66c7 100644 --- a/src/pages/Profile/AdvancedProfile.js +++ b/src/pages/Profile/AdvancedProfile.js @@ -180,7 +180,6 @@ const columns = [ }, ]; -export default @connect(({ profile, loading }) => ({ profile, loading: loading.effects['profile/fetchAdvanced'], @@ -350,3 +349,5 @@ class AdvancedProfile extends Component { ); } } + +export default AdvancedProfile; diff --git a/src/pages/Profile/BasicProfile.js b/src/pages/Profile/BasicProfile.js index fa34203165bf79a66dedee5cd7db804190815e1e..bd0b7c99fa54d7dff75efe62f87a06b9c440d626 100644 --- a/src/pages/Profile/BasicProfile.js +++ b/src/pages/Profile/BasicProfile.js @@ -41,7 +41,6 @@ const progressColumns = [ }, ]; -export default @connect(({ profile, loading }) => ({ profile, loading: loading.effects['profile/fetchBasic'], @@ -182,3 +181,5 @@ class BasicProfile extends Component { ); } } + +export default BasicProfile; diff --git a/src/pages/User/Register.js b/src/pages/User/Register.js index 0c9aa0e3332968b0c0f8ee52736975111b5b657e..b57455c64d3f2376e4a8dfd531f7ffe4dd12d506 100644 --- a/src/pages/User/Register.js +++ b/src/pages/User/Register.js @@ -21,7 +21,6 @@ const passwordProgressMap = { poor: 'exception', }; -export default @connect(({ register, loading }) => ({ register, submitting: loading.effects['register/submit'], @@ -290,3 +289,5 @@ class Register extends Component { ); } } + +export default Register;