liting2017 6 lat temu
rodzic
commit
431ee974c0
1 zmienionych plików z 2 dodań i 1 usunięć
  1. 2 1
      js/component/account/evaluate/index.jsx

+ 2 - 1
js/component/account/evaluate/index.jsx

@@ -159,6 +159,7 @@ const Evaluate = React.createClass({
         render: (text, it) => { return Moment(it.createTime).format('YYYY/MM/DD') }
       }
     ];
+    const hasSelected = this.state.selectedRowKeys.length > 0;
     return (
       <Spin spinning={this.state.loading}>
         <div className="content-container">
@@ -167,7 +168,7 @@ const Evaluate = React.createClass({
               <div className="content-actions"><Button type="primary" onClick={this.addClick}>开始新评估<Icon type="plus" /></Button></div>
           </div>
           <div className="content-search">
-            <Button type="danger" onClick={this.remove} disabled={!this.state.selectedRowKeys.length}>删除</Button>
+            <Button type="danger" onClick={this.remove} disabled={!hasSelected}>删除</Button>
           </div>
           <div className="content-body">
             <Table rowKey="id" columns={columns}