forked from nsjcy/frontEnd/nsjcy

1
liuwh
2020-02-26 b321fc6111c6483e3b2e501620d2e7ffc6a22f15
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/**
 * 徐祥健<xuxj@hugeinfo.com.cn>
 * 2018年7月16日 17:32
 *
 */
 
 
import React from 'react';
import { Table } from 'antd';
import './style.scss';
 
export default class TableView extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      value: ''
    };
  }
  render() {
    const { columns, size, data, pageSize, loading, rowSelection } = this.props;
    return (
      <React.Fragment>
        <div className="table-view-main">
          <Table
            columns={columns}
            rowKey={record => record.businessId ? record.businessId : record.id}
            dataSource={data}
            pagination={{
              pageSize: parseInt(pageSize),
              showTotal: total => `共 ${total} 条`
            }}
            size={size}
            loading={loading}
            rowSelection={rowSelection}
            filterMultiple={false}
 
          />
 
        </div>
      </React.Fragment>
    );
  }
 
}