SaveNum.jsx 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. import React from 'react';
  2. import { connect, history } from 'umi';
  3. import { Button } from 'antd';
  4. import { PageContainer } from '@ant-design/pro-layout';
  5. import ProTable from '@ant-design/pro-table';
  6. import request, { queryTable } from '@/utils/request';
  7. const SaveNum = () => {
  8. const columns = [
  9. {
  10. title: '科普名称',
  11. key: 'name',
  12. dataIndex: 'name',
  13. },
  14. {
  15. title: '收藏时间',
  16. key: 'date',
  17. dataIndex: 'date',
  18. valueType: 'dateTime',
  19. },
  20. ];
  21. return (
  22. <PageContainer
  23. header={{
  24. extra: [
  25. <Button key="1" onClick={() => history.go('-1')}>
  26. 返回
  27. </Button>,
  28. ],
  29. }}
  30. >
  31. <ProTable
  32. toolbar={{
  33. title:<div><span>{'姓名'}</span><span style={{marginLeft: '30vw'}}>收藏数:{}</span></div>,
  34. }}
  35. columns={columns}
  36. search={false}
  37. // request={queryTable('/statis/student-data')}
  38. rowKey="personId"
  39. options={false}
  40. />
  41. </PageContainer>
  42. );
  43. };
  44. export default SaveNum