import React, { useState, useEffect, useRef } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Table } from 'antd';

export default (props) => {
  const actionRef = useRef();

  const dataSource = [
    {
      key: '1',
      name: '深松传感器',
      createDate: '2022-03-27',
      status: '',
    },
    {
      key: '2',
      name: '无人机设备',
      createDate: '2022-03-13',
      status: '',
    },
  ];

  const columns = [
    {
      title: '分类名',
      dataIndex: 'name',
      key: 'name',
    },
    {
      title: '创建时间',
      dataIndex: 'createDate',
      key: 'createDate',
      width: 340,
    },
    {
      title: '状态',
      dataIndex: 'status',
      key: 'status',
    },
  ];

  return (
    <PageHeaderWrapper>
      <Table
        search={false}
        columns={columns}
        dataSource={dataSource}
        actionRef={actionRef}
        options={false}
        // toolBarRender={actions}
        scroll={{ x: 1000 }}
      />
    </PageHeaderWrapper>
  );
};
