/**
|
* 徐祥健<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>
|
);
|
}
|
|
}
|