import * as React from 'react' import * as typings from './setting.type' import {observer, inject} from 'mobx-react' import {MenuItem} from '../../../../../../menu/src' import Modal from '../../../../../../modal/src' import Switch from '../../../../../../switch/src' import {autoBindMethod} from '../../../../../../../common/auto-bind/src' import './setting.scss' @inject('setting') @observer export default class Setting extends React.Component { static defaultProps: typings.PropsDefine = new typings.Props() public state: typings.StateDefine = new typings.State() @autoBindMethod handleShowModal() { this.setState({ show: true }) } @autoBindMethod handleOk() { this.setState({ show: false }) } @autoBindMethod handleCancel() { this.setState({ show: false }) } @autoBindMethod setConfirmWhenRemoveComponent(checked: boolean) { this.props.setting.setConfirmWhenRemoveComponent(checked) } @autoBindMethod setShowLayoutWhenDragging(checked: boolean) { this.props.setting.setShowLayoutWhenDragging(checked) } render() { return (
设置
设置
点击移除时会弹出确认框
拖动时显示所有布局元素
) } }