From a29ef6b3d33ee17d365c704da1de7abb2dd4bde8 Mon Sep 17 00:00:00 2001 From: lijiehua <41830859@qq.com> Date: Thu, 6 Sep 2018 23:38:33 +0800 Subject: [PATCH] fix lint error --- src/pages/Account/Center/Applications.js | 3 ++- src/pages/Account/Center/Articles.js | 3 ++- src/pages/Account/Center/Projects.js | 3 ++- src/pages/Account/Settings/BaseView.js | 1 + src/pages/Account/Settings/BindingView.js | 1 + src/pages/Account/Settings/GeographicView.js | 3 ++- src/pages/Account/Settings/Info.js | 3 ++- src/pages/Account/Settings/NotificationView.js | 1 + src/pages/Account/Settings/SecurityView.js | 1 + src/pages/Exception/TriggerException.js | 3 ++- src/pages/Forms/BasicForm.js | 3 ++- src/pages/Forms/StepForm/Step1.js | 3 ++- src/pages/Forms/StepForm/Step2.js | 9 +++++---- src/pages/Forms/StepForm/Step3.js | 3 ++- src/pages/Forms/TableForm.js | 4 +++- src/pages/List/Applications.js | 3 ++- src/pages/List/Articles.js | 3 ++- src/pages/List/BasicList.js | 3 ++- src/pages/List/CardList.js | 3 ++- src/pages/List/List.js | 3 ++- src/pages/List/Projects.js | 4 +++- src/pages/List/TableList.js | 3 ++- src/pages/Profile/AdvancedProfile.js | 3 ++- src/pages/Profile/BasicProfile.js | 3 ++- src/pages/User/Register.js | 3 ++- 25 files changed, 51 insertions(+), 24 deletions(-) diff --git a/src/pages/Account/Center/Applications.js b/src/pages/Account/Center/Applications.js index 54d1ff87..513f6044 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 fb42f2a9..27b90d0a 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 c4e389ab..ac749fdb 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 42952d1d..39e90766 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 1080e350..29a29890 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 8d6925cd..d33cb138 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 ab7edaf9..ceee506b 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 81862945..96677bbd 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 4075a312..0706bd0b 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 1f561ee6..15ace510 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 9040ccea..12eca38f 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 1be5d661..a62e2941 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 fb6ad480..3e3b05bf 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 4004c399..74e1a6b8 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 fad77137..ae2723e7 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 4d0871fe..62d46743 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 a9a8c0f5..0aec03c8 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 9e4e3ee2..b52a2999 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 f7a04ebf..03f799a1 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 9662df0a..18ac7569 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 e36cbdc2..e2821754 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 7e4d985d..1853dab6 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 4ee9af2e..0006f993 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 fa342031..bd0b7c99 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 0c9aa0e3..b57455c6 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; -- GitLab