import React from 'react';
import { Table } from 'antd';

class TableView extends React.Component {
    constructor(props) {
        super(props);
        this.state = {

        }
    }

    render() {
        const columns = [{
            title: '列1',
            key: 'c1',
            dataIndex: 'c1'
        }, {
            title: '列2',
            key: 'c2',
            dataIndex: 'c2'
        }];

        const data = [{
            key: '1',
            c1: 'sssss',
            c2: 'aaaaa'
        }, {
            key: '2',
            c1: '啊啊啊啊',
            c2: 'aaaadddbb'
        }]

        return (
            <Table columns={columns} dataSource={data}/>
        );
    }
}

export default TableView;