Commit cbf117ec authored by afc163's avatar afc163 Committed by 偏右

upgrade babel-eslint version

parent b2ebc0eb
...@@ -51,8 +51,9 @@ Shape.registerShape('point', 'pointer', { ...@@ -51,8 +51,9 @@ Shape.registerShape('point', 'pointer', {
}, },
}); });
export default
@autoHeight() @autoHeight()
export default class Gauge extends React.Component { class Gauge extends React.Component {
render() { render() {
const { const {
title, title,
......
...@@ -3,8 +3,9 @@ import { Chart, Axis, Tooltip, Geom } from 'bizcharts'; ...@@ -3,8 +3,9 @@ import { Chart, Axis, Tooltip, Geom } from 'bizcharts';
import autoHeight from '../autoHeight'; import autoHeight from '../autoHeight';
import styles from '../index.less'; import styles from '../index.less';
export default
@autoHeight() @autoHeight()
export default class MiniArea extends React.PureComponent { class MiniArea extends React.PureComponent {
render() { render() {
const { const {
height, height,
......
...@@ -3,8 +3,9 @@ import { Chart, Tooltip, Geom } from 'bizcharts'; ...@@ -3,8 +3,9 @@ import { Chart, Tooltip, Geom } from 'bizcharts';
import autoHeight from '../autoHeight'; import autoHeight from '../autoHeight';
import styles from '../index.less'; import styles from '../index.less';
export default
@autoHeight() @autoHeight()
export default class MiniBar extends React.Component { class MiniBar extends React.Component {
render() { render() {
const { height, forceFit = true, color = '#1890FF', data = [] } = this.props; const { height, forceFit = true, color = '#1890FF', data = [] } = this.props;
......
...@@ -11,8 +11,9 @@ import autoHeight from '../autoHeight'; ...@@ -11,8 +11,9 @@ import autoHeight from '../autoHeight';
import styles from './index.less'; import styles from './index.less';
/* eslint react/no-danger:0 */ /* eslint react/no-danger:0 */
export default
@autoHeight() @autoHeight()
export default class Pie extends Component { class Pie extends Component {
state = { state = {
legendData: [], legendData: [],
legendBlock: false, legendBlock: false,
......
...@@ -5,8 +5,9 @@ import autoHeight from '../autoHeight'; ...@@ -5,8 +5,9 @@ import autoHeight from '../autoHeight';
import styles from './index.less'; import styles from './index.less';
/* eslint react/no-danger:0 */ /* eslint react/no-danger:0 */
export default
@autoHeight() @autoHeight()
export default class Radar extends Component { class Radar extends Component {
state = { state = {
legendData: [], legendData: [],
}; };
......
...@@ -5,8 +5,9 @@ import Slider from 'bizcharts-plugin-slider'; ...@@ -5,8 +5,9 @@ import Slider from 'bizcharts-plugin-slider';
import autoHeight from '../autoHeight'; import autoHeight from '../autoHeight';
import styles from './index.less'; import styles from './index.less';
export default
@autoHeight() @autoHeight()
export default class TimelineChart extends React.Component { class TimelineChart extends React.Component {
render() { render() {
const { const {
title, title,
......
...@@ -6,8 +6,9 @@ import styles from './index.less'; ...@@ -6,8 +6,9 @@ import styles from './index.less';
/* eslint no-mixed-operators: 0 */ /* eslint no-mixed-operators: 0 */
// riddle: https://riddle.alibaba-inc.com/riddles/2d9a4b90 // riddle: https://riddle.alibaba-inc.com/riddles/2d9a4b90
export default
@autoHeight() @autoHeight()
export default class WaterWave extends PureComponent { class WaterWave extends PureComponent {
state = { state = {
radio: 1, radio: 1,
}; };
......
...@@ -5,10 +5,11 @@ import { connect } from 'dva'; ...@@ -5,10 +5,11 @@ import { connect } from 'dva';
import { formatWan } from '@/utils/utils'; import { formatWan } from '@/utils/utils';
import stylesApplications from '../../List/Applications.less'; import stylesApplications from '../../List/Applications.less';
export default
@connect(({ list }) => ({ @connect(({ list }) => ({
list, list,
})) }))
export default class Center extends PureComponent { class Center extends PureComponent {
render() { render() {
const { const {
list: { list }, list: { list },
......
...@@ -5,10 +5,11 @@ import { connect } from 'dva'; ...@@ -5,10 +5,11 @@ import { connect } from 'dva';
import stylesArticles from '../../List/Articles.less'; import stylesArticles from '../../List/Articles.less';
import styles from './Articles.less'; import styles from './Articles.less';
export default
@connect(({ list }) => ({ @connect(({ list }) => ({
list, list,
})) }))
export default class Center extends PureComponent { class Center extends PureComponent {
render() { render() {
const { const {
list: { list }, list: { list },
......
...@@ -6,6 +6,7 @@ import { Card, Row, Col, Icon, Avatar, Tag, Divider, Spin, Input } from 'antd'; ...@@ -6,6 +6,7 @@ import { Card, Row, Col, Icon, Avatar, Tag, Divider, Spin, Input } from 'antd';
import GridContent from '@/components/PageHeaderWrapper/GridContent'; import GridContent from '@/components/PageHeaderWrapper/GridContent';
import styles from './Center.less'; import styles from './Center.less';
export default
@connect(({ loading, user, project }) => ({ @connect(({ loading, user, project }) => ({
listLoading: loading.effects['list/fetch'], listLoading: loading.effects['list/fetch'],
currentUser: user.currentUser, currentUser: user.currentUser,
...@@ -13,7 +14,7 @@ import styles from './Center.less'; ...@@ -13,7 +14,7 @@ import styles from './Center.less';
project, project,
projectLoading: loading.effects['project/fetchNotice'], projectLoading: loading.effects['project/fetchNotice'],
})) }))
export default class Center extends PureComponent { class Center extends PureComponent {
state = { state = {
newTags: [], newTags: [],
inputVisible: false, inputVisible: false,
......
...@@ -5,10 +5,11 @@ import { connect } from 'dva'; ...@@ -5,10 +5,11 @@ import { connect } from 'dva';
import AvatarList from '@/components/AvatarList'; import AvatarList from '@/components/AvatarList';
import stylesProjects from '../../List/Projects.less'; import stylesProjects from '../../List/Projects.less';
export default
@connect(({ list }) => ({ @connect(({ list }) => ({
list, list,
})) }))
export default class Center extends PureComponent { class Center extends PureComponent {
render() { render() {
const { const {
list: { list }, list: { list },
......
...@@ -10,6 +10,7 @@ const nullSlectItem = { ...@@ -10,6 +10,7 @@ const nullSlectItem = {
key: '', key: '',
}; };
export default
@connect(({ geographic }) => { @connect(({ geographic }) => {
const { province, isLoading, city } = geographic; const { province, isLoading, city } = geographic;
return { return {
...@@ -18,7 +19,7 @@ const nullSlectItem = { ...@@ -18,7 +19,7 @@ const nullSlectItem = {
isLoading, isLoading,
}; };
}) })
export default class GeographicView extends PureComponent { class GeographicView extends PureComponent {
componentDidMount = () => { componentDidMount = () => {
const { dispatch } = this.props; const { dispatch } = this.props;
dispatch({ dispatch({
......
...@@ -8,10 +8,11 @@ import styles from './Info.less'; ...@@ -8,10 +8,11 @@ import styles from './Info.less';
const { Item } = Menu; const { Item } = Menu;
export default
@connect(({ user }) => ({ @connect(({ user }) => ({
currentUser: user.currentUser, currentUser: user.currentUser,
})) }))
export default class Info extends Component { class Info extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
const { match, location } = props; const { match, location } = props;
......
...@@ -20,12 +20,14 @@ const havePermissionAsync = new Promise(resolve => { ...@@ -20,12 +20,14 @@ const havePermissionAsync = new Promise(resolve => {
// Call resolve on behalf of passed // Call resolve on behalf of passed
setTimeout(() => resolve(), 300); setTimeout(() => resolve(), 300);
}); });
export default
@Secured(havePermissionAsync) @Secured(havePermissionAsync)
@connect(({ monitor, loading }) => ({ @connect(({ monitor, loading }) => ({
monitor, monitor,
loading: loading.models.monitor, loading: loading.models.monitor,
})) }))
export default class Monitor extends PureComponent { class Monitor extends PureComponent {
componentDidMount() { componentDidMount() {
const { dispatch } = this.props; const { dispatch } = this.props;
dispatch({ dispatch({
......
...@@ -37,6 +37,7 @@ const links = [ ...@@ -37,6 +37,7 @@ const links = [
}, },
]; ];
export default
@connect(({ user, project, activities, chart, loading }) => ({ @connect(({ user, project, activities, chart, loading }) => ({
currentUser: user.currentUser, currentUser: user.currentUser,
project, project,
...@@ -46,7 +47,7 @@ const links = [ ...@@ -46,7 +47,7 @@ const links = [
projectLoading: loading.effects['project/fetchNotice'], projectLoading: loading.effects['project/fetchNotice'],
activitiesLoading: loading.effects['activities/fetchList'], activitiesLoading: loading.effects['activities/fetchList'],
})) }))
export default class Workplace extends PureComponent { class Workplace extends PureComponent {
componentDidMount() { componentDidMount() {
const { dispatch } = this.props; const { dispatch } = this.props;
dispatch({ dispatch({
......
...@@ -3,10 +3,11 @@ import { Button, Spin, Card } from 'antd'; ...@@ -3,10 +3,11 @@ import { Button, Spin, Card } from 'antd';
import { connect } from 'dva'; import { connect } from 'dva';
import styles from './style.less'; import styles from './style.less';
export default
@connect(state => ({ @connect(state => ({
isloading: state.error.isloading, isloading: state.error.isloading,
})) }))
export default class TriggerException extends PureComponent { class TriggerException extends PureComponent {
state = { state = {
isloading: false, isloading: false,
}; };
......
...@@ -57,11 +57,12 @@ const tableData = [ ...@@ -57,11 +57,12 @@ const tableData = [
}, },
]; ];
export default
@connect(({ loading }) => ({ @connect(({ loading }) => ({
submitting: loading.effects['form/submitAdvancedForm'], submitting: loading.effects['form/submitAdvancedForm'],
})) }))
@Form.create() @Form.create()
export default class AdvancedForm extends PureComponent { class AdvancedForm extends PureComponent {
state = { state = {
width: '100%', width: '100%',
}; };
......
...@@ -20,11 +20,12 @@ const { Option } = Select; ...@@ -20,11 +20,12 @@ const { Option } = Select;
const { RangePicker } = DatePicker; const { RangePicker } = DatePicker;
const { TextArea } = Input; const { TextArea } = Input;
export default
@connect(({ loading }) => ({ @connect(({ loading }) => ({
submitting: loading.effects['form/submitRegularForm'], submitting: loading.effects['form/submitRegularForm'],
})) }))
@Form.create() @Form.create()
export default class BasicForms extends PureComponent { class BasicForms extends PureComponent {
handleSubmit = e => { handleSubmit = e => {
const { dispatch, form } = this.props; const { dispatch, form } = this.props;
e.preventDefault(); e.preventDefault();
......
...@@ -15,11 +15,12 @@ const formItemLayout = { ...@@ -15,11 +15,12 @@ const formItemLayout = {
}, },
}; };
export default
@connect(({ form }) => ({ @connect(({ form }) => ({
data: form.step, data: form.step,
})) }))
@Form.create() @Form.create()
export default class Step1 extends React.PureComponent { class Step1 extends React.PureComponent {
render() { render() {
const { form, dispatch, data } = this.props; const { form, dispatch, data } = this.props;
const { getFieldDecorator, validateFields } = form; const { getFieldDecorator, validateFields } = form;
......
...@@ -5,10 +5,11 @@ import router from 'umi/router'; ...@@ -5,10 +5,11 @@ import router from 'umi/router';
import Result from '@/components/Result'; import Result from '@/components/Result';
import styles from './style.less'; import styles from './style.less';
export default
@connect(({ form }) => ({ @connect(({ form }) => ({
data: form.step, data: form.step,
})) }))
export default class Step3 extends React.PureComponent { class Step3 extends React.PureComponent {
render() { render() {
const { data } = this.props; const { data } = this.props;
const onFinish = () => { const onFinish = () => {
......
...@@ -12,12 +12,13 @@ import styles from './Applications.less'; ...@@ -12,12 +12,13 @@ import styles from './Applications.less';
const { Option } = Select; const { Option } = Select;
const FormItem = Form.Item; const FormItem = Form.Item;
export default
@Form.create() @Form.create()
@connect(({ list, loading }) => ({ @connect(({ list, loading }) => ({
list, list,
loading: loading.models.list, loading: loading.models.list,
})) }))
export default class FilterCardList extends PureComponent { class FilterCardList extends PureComponent {
componentDidMount() { componentDidMount() {
const { dispatch } = this.props; const { dispatch } = this.props;
dispatch({ dispatch({
......
...@@ -12,12 +12,13 @@ const FormItem = Form.Item; ...@@ -12,12 +12,13 @@ const FormItem = Form.Item;
const pageSize = 5; const pageSize = 5;
export default
@Form.create() @Form.create()
@connect(({ list, loading }) => ({ @connect(({ list, loading }) => ({
list, list,
loading: loading.models.list, loading: loading.models.list,
})) }))
export default class SearchList extends Component { class SearchList extends Component {
componentDidMount() { componentDidMount() {
this.fetchMore(); this.fetchMore();
} }
......
...@@ -32,12 +32,13 @@ const RadioGroup = Radio.Group; ...@@ -32,12 +32,13 @@ const RadioGroup = Radio.Group;
const SelectOption = Select.Option; const SelectOption = Select.Option;
const { Search, TextArea } = Input; const { Search, TextArea } = Input;
export default
@connect(({ list, loading }) => ({ @connect(({ list, loading }) => ({
list, list,
loading: loading.models.list, loading: loading.models.list,
})) }))
@Form.create() @Form.create()
export default class BasicList extends PureComponent { class BasicList extends PureComponent {
state = { visible: false, done: false }; state = { visible: false, done: false };
formLayout = { formLayout = {
......
...@@ -7,11 +7,12 @@ import PageHeaderWrapper from '@/components/PageHeaderWrapper'; ...@@ -7,11 +7,12 @@ import PageHeaderWrapper from '@/components/PageHeaderWrapper';
import styles from './CardList.less'; import styles from './CardList.less';
export default
@connect(({ list, loading }) => ({ @connect(({ list, loading }) => ({
list, list,
loading: loading.models.list, loading: loading.models.list,
})) }))
export default class CardList extends PureComponent { class CardList extends PureComponent {
componentDidMount() { componentDidMount() {
const { dispatch } = this.props; const { dispatch } = this.props;
dispatch({ dispatch({
......
...@@ -4,8 +4,9 @@ import { connect } from 'dva'; ...@@ -4,8 +4,9 @@ import { connect } from 'dva';
import { Input } from 'antd'; import { Input } from 'antd';
import PageHeaderWrapper from '@/components/PageHeaderWrapper'; import PageHeaderWrapper from '@/components/PageHeaderWrapper';
export default
@connect() @connect()
export default class SearchList extends Component { class SearchList extends Component {
handleTabChange = key => { handleTabChange = key => {
const { match } = this.props; const { match } = this.props;
switch (key) { switch (key) {
......
...@@ -14,12 +14,13 @@ const { Option } = Select; ...@@ -14,12 +14,13 @@ const { Option } = Select;
const FormItem = Form.Item; const FormItem = Form.Item;
/* eslint react/no-array-index-key: 0 */ /* eslint react/no-array-index-key: 0 */
export default
@Form.create() @Form.create()
@connect(({ list, loading }) => ({ @connect(({ list, loading }) => ({
list, list,
loading: loading.models.list, loading: loading.models.list,
})) }))
export default class CoverCardList extends PureComponent { class CoverCardList extends PureComponent {
componentDidMount() { componentDidMount() {
const { dispatch } = this.props; const { dispatch } = this.props;
dispatch({ dispatch({
......
...@@ -266,12 +266,13 @@ class UpdateForm extends PureComponent { ...@@ -266,12 +266,13 @@ class UpdateForm extends PureComponent {
} }
/* eslint react/no-multi-comp:0 */ /* eslint react/no-multi-comp:0 */
export default
@connect(({ rule, loading }) => ({ @connect(({ rule, loading }) => ({
rule, rule,
loading: loading.models.rule, loading: loading.models.rule,
})) }))
@Form.create() @Form.create()
export default class TableList extends PureComponent { class TableList extends PureComponent {
state = { state = {
modalVisible: false, modalVisible: false,
updateModalVisible: false, updateModalVisible: false,
......
...@@ -180,11 +180,12 @@ const columns = [ ...@@ -180,11 +180,12 @@ const columns = [
}, },
]; ];
export default
@connect(({ profile, loading }) => ({ @connect(({ profile, loading }) => ({
profile, profile,
loading: loading.effects['profile/fetchAdvanced'], loading: loading.effects['profile/fetchAdvanced'],
})) }))
export default class AdvancedProfile extends Component { class AdvancedProfile extends Component {
state = { state = {
operationkey: 'tab1', operationkey: 'tab1',
stepDirection: 'horizontal', stepDirection: 'horizontal',
......
...@@ -41,11 +41,12 @@ const progressColumns = [ ...@@ -41,11 +41,12 @@ const progressColumns = [
}, },
]; ];
export default
@connect(({ profile, loading }) => ({ @connect(({ profile, loading }) => ({
profile, profile,
loading: loading.effects['profile/fetchBasic'], loading: loading.effects['profile/fetchBasic'],
})) }))
export default class BasicProfile extends Component { class BasicProfile extends Component {
componentDidMount() { componentDidMount() {
const { dispatch } = this.props; const { dispatch } = this.props;
dispatch({ dispatch({
......
...@@ -7,11 +7,12 @@ import styles from './Login.less'; ...@@ -7,11 +7,12 @@ import styles from './Login.less';
const { Tab, UserName, Password, Mobile, Captcha, Submit } = Login; const { Tab, UserName, Password, Mobile, Captcha, Submit } = Login;
export default
@connect(({ login, loading }) => ({ @connect(({ login, loading }) => ({
login, login,
submitting: loading.effects['login/login'], submitting: loading.effects['login/login'],
})) }))
export default class LoginPage extends Component { class LoginPage extends Component {
state = { state = {
type: 'account', type: 'account',
autoLogin: true, autoLogin: true,
......
...@@ -21,12 +21,13 @@ const passwordProgressMap = { ...@@ -21,12 +21,13 @@ const passwordProgressMap = {
poor: 'exception', poor: 'exception',
}; };
export default
@connect(({ register, loading }) => ({ @connect(({ register, loading }) => ({
register, register,
submitting: loading.effects['register/submit'], submitting: loading.effects['register/submit'],
})) }))
@Form.create() @Form.create()
export default class Register extends Component { class Register extends Component {
state = { state = {
count: 0, count: 0,
confirmDirty: false, confirmDirty: false,
......
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