eslint fix

This commit is contained in:
zuiidea
2018-02-26 19:35:58 +08:00
parent 479fc647c3
commit f6e11bb464
18 changed files with 78 additions and 42 deletions
+3 -1
View File
@@ -2,7 +2,9 @@ import React from 'react'
import PropTypes from 'prop-types'
import { Dropdown, Button, Icon, Menu } from 'antd'
const DropOption = ({ onMenuClick, menuOptions = [], buttonStyle, dropdownProps }) => {
const DropOption = ({
onMenuClick, menuOptions = [], buttonStyle, dropdownProps,
}) => {
const menu = menuOptions.map(item => <Menu.Item key={item.key}>{item.name}</Menu.Item>)
return (<Dropdown
overlay={<Menu onClick={onMenuClick}>{menu}</Menu>}
+3 -1
View File
@@ -6,7 +6,9 @@ import styles from './Page.less'
export default class Page extends Component {
render () {
const { className, children, loading = false, inner = false } = this.props
const {
className, children, loading = false, inner = false,
} = this.props
const loadingStyle = {
height: 'calc(100vh - 184px)',
overflow: 'hidden',
+3 -1
View File
@@ -38,7 +38,9 @@ class Search extends React.Component {
this.handleSearch()
}
render () {
const { size, select, selectOptions, selectProps, style, keyword } = this.props
const {
size, select, selectOptions, selectProps, style, keyword,
} = this.props
const { clearVisible } = this.state
return (
<Input.Group compact size={size} className={styles.search} style={style}>
+19 -18
View File
@@ -5,7 +5,9 @@ import ReactDOM from 'react-dom'
import classnames from 'classnames'
import styles from './layer.less'
const { info, success, error, warning, confirm } = Modal
const {
info, success, error, warning, confirm,
} = Modal
const layer = {
prefixCls: 'ant-layer',
@@ -53,32 +55,31 @@ layer.open = (config) => {
const { className, wrapClassName = '', verticalCenter = true } = modalProps
const { prefixCls } = layer
layer.index += 1
const index = layer.index
const { index } = layer
let div = document.createElement('div')
div.id = `${prefixCls}-reference-${index}`
div.className = `${prefixCls}-reference`
document.body.appendChild(div)
ReactDOM.render(
<Modal
visible
title="Title"
transitionName="zoom"
maskTransitionName="fade"
onCancel={() => {
ReactDOM.render(<Modal
visible
title="Title"
transitionName="zoom"
maskTransitionName="fade"
onCancel={() => {
layer.close(index)
}}
onOk={() => {
onOk={() => {
layer.close(index)
}}
{...modalProps}
wrapClassName={classnames({ [styles.verticalCenter]: verticalCenter, [wrapClassName]: true })}
className={classnames(prefixCls, className, [`${prefixCls}-${index}`])}
>
<div className={`${prefixCls}-body-wrapper`} style={{ maxHeight: document.body.clientHeight - 256 }}>
{content}
</div>
</Modal>, div)
{...modalProps}
wrapClassName={classnames({ [styles.verticalCenter]: verticalCenter, [wrapClassName]: true })}
className={classnames(prefixCls, className, [`${prefixCls}-${index}`])}
>
<div className={`${prefixCls}-body-wrapper`} style={{ maxHeight: document.body.clientHeight - 256 }}>
{content}
</div>
</Modal>, div)
return index
}