diff --git a/src/routes/List/BasicList.js b/src/routes/List/BasicList.js index 15cfb9675f28c444f1abc7d19999af96c2ff3365..0d3e8358f6088ce5d15a7501f52d016e4e6d4d97 100644 --- a/src/routes/List/BasicList.js +++ b/src/routes/List/BasicList.js @@ -1,4 +1,5 @@ import React, { PureComponent } from 'react'; +import { findDOMNode } from 'react-dom'; import moment from 'moment'; import { connect } from 'dva'; import { List, Card, Row, Col, Radio, Input, Progress, Button, Icon, Dropdown, Menu, Avatar, @@ -48,12 +49,14 @@ export default class BasicList extends PureComponent { }); } handleDone = () => { + setTimeout(() => this.addBtn.blur(), 0); this.setState({ done: false, visible: false, }); } handleCancel = () => { + setTimeout(() => this.addBtn.blur(), 0); this.setState({ visible: false, }); @@ -63,6 +66,7 @@ export default class BasicList extends PureComponent { const { dispatch, form } = this.props; const id = this.state.current ? this.state.current.id : ''; + setTimeout(() => this.addBtn.blur(), 0); form.validateFields((err, fieldsValue) => { if (err) return; this.setState({ @@ -171,7 +175,7 @@ export default class BasicList extends PureComponent { title="操作成功" description="一系列的信息描述,很短同样也可以带标点。" actions={} - style={{ width: '100%', marginBottom: '24px' }} + className={styles.formResult} /> ); } @@ -246,7 +250,17 @@ export default class BasicList extends PureComponent { bodyStyle={{ padding: '0 32px 40px 32px' }} extra={extraContent} > -