index.jsx 1.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. import React, { useState, useEffect, useRef } from 'react';
  2. import { PageHeaderWrapper } from '@ant-design/pro-layout';
  3. import { Table } from 'antd';
  4. export default (props) => {
  5. const actionRef = useRef();
  6. const dataSource = [
  7. {
  8. key: '1',
  9. name: '深松传感器',
  10. createDate: '2022-03-27',
  11. status: '',
  12. },
  13. {
  14. key: '2',
  15. name: '无人机设备',
  16. createDate: '2022-03-13',
  17. status: '',
  18. },
  19. ];
  20. const columns = [
  21. {
  22. title: '分类名',
  23. dataIndex: 'name',
  24. key: 'name',
  25. },
  26. {
  27. title: '创建时间',
  28. dataIndex: 'createDate',
  29. key: 'createDate',
  30. width: 340,
  31. },
  32. {
  33. title: '状态',
  34. dataIndex: 'status',
  35. key: 'status',
  36. },
  37. ];
  38. return (
  39. <PageHeaderWrapper>
  40. <Table
  41. search={false}
  42. columns={columns}
  43. dataSource={dataSource}
  44. actionRef={actionRef}
  45. options={false}
  46. // toolBarRender={actions}
  47. scroll={{ x: 1000 }}
  48. />
  49. </PageHeaderWrapper>
  50. );
  51. };