1
1
import React , { PureComponent } from 'react' ;
2
2
import { connect } from 'dva' ;
3
- import { Row , Col , Card , Form , Input , Icon , Button , Dropdown , Menu , Modal , Table , Divider } from 'antd' ;
3
+ import { Row , Col , Card , Form , Input , Icon , Button , Dropdown , Menu , Modal , Table , Divider , Popconfirm } from 'antd' ;
4
4
// import StandardTable from '../../components/StandardTable';
5
5
import PageHeaderLayout from './../../layouts/pageHeaderLayout' ;
6
6
@@ -189,7 +189,7 @@ export default class TableList extends PureComponent {
189
189
} ,
190
190
} ;
191
191
192
- componentDidMount ( ) {
192
+ componentDidMount ( ) {
193
193
const { dispatch } = this . props ;
194
194
195
195
// 获取列表数据
@@ -396,7 +396,7 @@ export default class TableList extends PureComponent {
396
396
dispatch ( {
397
397
type : 'users/fetch' ,
398
398
payload : {
399
- currentPage :1
399
+ currentPage : 1
400
400
} ,
401
401
} ) ;
402
402
}
@@ -479,7 +479,7 @@ export default class TableList extends PureComponent {
479
479
</ FormItem >
480
480
</ Col >
481
481
</ Row >
482
- < div style = { { overflow : 'hidden' , marginTop :10 } } >
482
+ < div style = { { overflow : 'hidden' , marginTop : 10 } } >
483
483
< span style = { { float : 'right' , marginBottom : 24 } } >
484
484
< Button type = "primary" htmlType = "submit" > 查询</ Button >
485
485
< Button style = { { marginLeft : 8 } } onClick = { this . handleFormReset } > 重置</ Button >
@@ -497,11 +497,11 @@ export default class TableList extends PureComponent {
497
497
return this . state . expandForm ? this . renderAdvancedForm ( ) : this . renderSimpleForm ( ) ;
498
498
}
499
499
500
- render ( ) {
500
+ render ( ) {
501
501
const { pageModel : { loading : ruleLoading , data } } = this . props ;
502
- const { selectedRows, editModal, resetPwdModal} = this . state ;
502
+ const { selectedRows, editModal, resetPwdModal } = this . state ;
503
503
504
- const pagination = {
504
+ const pagination = {
505
505
current : data . pagination . currentPage ,
506
506
pageSize : data . pagination . pages ,
507
507
total : data . pagination . total ,
@@ -516,7 +516,7 @@ export default class TableList extends PureComponent {
516
516
const columns = [
517
517
{
518
518
title : '序号' ,
519
- render ( text , record , index ) {
519
+ render ( text , record , index ) {
520
520
return index + 1 ;
521
521
} ,
522
522
} ,
@@ -554,12 +554,15 @@ export default class TableList extends PureComponent {
554
554
> 修改
555
555
</ a >
556
556
< Divider type = "vertical" />
557
- < a
558
- onClick = { ( ) => {
557
+ < Popconfirm
558
+ title = "确认删除?"
559
+ onConfirm = { ( ) => {
559
560
this . handleRemove ( record . id ) ;
560
- } }
561
- > 删除
561
+ } } >
562
+ < a
563
+ > 删除
562
564
</ a >
565
+ </ Popconfirm >
563
566
</ div >
564
567
) ,
565
568
} ,
0 commit comments