Commit e2a8896a by hfpp2012 yinsigan

fix typo

1 parent 0843d50f
import React from 'react' import React from 'react'
import Element from './Element' import Element from './Element'
import ReactAddonsUpdate from 'react-addons-update' import ReactAddonsUpdate from 'react-addons-update'
import autoBind from 'react-autobind'
export default class ElementGroup extends React.Component { export default class ElementGroup extends React.Component {
constructor(props){ constructor(props){
...@@ -12,9 +13,7 @@ export default class ElementGroup extends React.Component { ...@@ -12,9 +13,7 @@ export default class ElementGroup extends React.Component {
{ id: 3, name: "药架格", initialPos: {x: 80, y: 70 + 60 * 2}, target_type: 'RegionalDesign::DrugBrandreth' } { id: 3, name: "药架格", initialPos: {x: 80, y: 70 + 60 * 2}, target_type: 'RegionalDesign::DrugBrandreth' }
] ]
}; };
this.cloneElement = this.cloneElement.bind(this); autoBind(this);
this.deleteElement = this.deleteElement.bind(this);
this.deleteLastElement = this.deleteLastElement.bind(this);
} }
cloneElement(element) { cloneElement(element) {
......
...@@ -3,6 +3,7 @@ import ModalRepoForm from './ModalRepoForm' ...@@ -3,6 +3,7 @@ import ModalRepoForm from './ModalRepoForm'
import ReactAddonsUpdate from 'react-addons-update' import ReactAddonsUpdate from 'react-addons-update'
import Loader from 'halogen/PulseLoader' import Loader from 'halogen/PulseLoader'
import { Link } from 'react-router-dom' import { Link } from 'react-router-dom'
import autoBind from 'react-autobind'
export default class Header extends React.Component { export default class Header extends React.Component {
constructor(props){ constructor(props){
...@@ -10,7 +11,7 @@ export default class Header extends React.Component { ...@@ -10,7 +11,7 @@ export default class Header extends React.Component {
this.state = { this.state = {
data: null, loading: true, error: null data: null, loading: true, error: null
}; };
this.addRepo = this.addRepo.bind(this); autoBind(this);
} }
componentDidMount() { componentDidMount() {
......
...@@ -3,6 +3,7 @@ import { Modal, Button } from 'react-bootstrap' ...@@ -3,6 +3,7 @@ import { Modal, Button } from 'react-bootstrap'
import { Form, FormGroup, Col, FormControl, ControlLabel } from 'react-bootstrap' import { Form, FormGroup, Col, FormControl, ControlLabel } from 'react-bootstrap'
import EventEmitter from '../libs/eventEmitter' import EventEmitter from '../libs/eventEmitter'
import $ from 'jquery' import $ from 'jquery'
import autoBind from 'react-autobind'
export default class ModalRepoForm extends React.Component { export default class ModalRepoForm extends React.Component {
constructor(props){ constructor(props){
...@@ -10,11 +11,7 @@ export default class ModalRepoForm extends React.Component { ...@@ -10,11 +11,7 @@ export default class ModalRepoForm extends React.Component {
this.state = { this.state = {
showModal: false, name: '' showModal: false, name: ''
}; };
this.init_state = this.state; autoBind(this);
this.close = this.close.bind(this);
this.open = this.open.bind(this);
this.handleChange = this.handleChange.bind(this);
this.save = this.save.bind(this);
} }
close() { close() {
......
...@@ -4,6 +4,7 @@ import Element from './Element' ...@@ -4,6 +4,7 @@ import Element from './Element'
import ReactAddonsUpdate from 'react-addons-update' import ReactAddonsUpdate from 'react-addons-update'
import EventEmitter from '../libs/eventEmitter' import EventEmitter from '../libs/eventEmitter'
import $ from 'jquery' import $ from 'jquery'
import autoBind from 'react-autobind'
export default class RegionalDesign extends React.Component { export default class RegionalDesign extends React.Component {
constructor(props){ constructor(props){
...@@ -11,10 +12,7 @@ export default class RegionalDesign extends React.Component { ...@@ -11,10 +12,7 @@ export default class RegionalDesign extends React.Component {
this.state = { this.state = {
data: null, loading: true, error: null, object_name: '', object_type: '', children_object_type: '' data: null, loading: true, error: null, object_name: '', object_type: '', children_object_type: ''
}; };
this.init_state = this.state; autoBind(this);
this.addElement = this.addElement.bind(this);
this.updateElement = this.updateElement.bind(this);
this.addElement = this.addElement.bind(this);
} }
getConfig(props, key) { getConfig(props, key) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!