From e9d8e00747da78b4653820b8e06a63e2a5c4f421 Mon Sep 17 00:00:00 2001 From: valleykid Date: Fri, 2 Mar 2018 18:26:13 +0800 Subject: [PATCH] Fix @luli reveiw --- src/routes/List/BasicList.js | 23 +++++++++++++++++++---- src/routes/List/BasicList.less | 19 +++++++++++++++++++ 2 files changed, 38 insertions(+), 4 deletions(-) diff --git a/src/routes/List/BasicList.js b/src/routes/List/BasicList.js index 15cfb967..0d3e8358 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} > -