PictureCardList.js 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. import React from 'react';
  2. import { PictureItem } from '../../../components/AXItem';
  3. import { StandardCardList } from '../../../components/AXList';
  4. function PictureCardList({
  5. UIParams, dataSource, loading, totalSize, pageSize, pageNo,
  6. onFilterClick, onCreateClick, onBatchClick, onEditClick,
  7. }) {
  8. const batchActions = [{
  9. key: 'delete',
  10. name: '批量删除',
  11. }, {
  12. key: 'edit',
  13. name: '批量编辑',
  14. }];
  15. const basicSearch = {
  16. keys: [{
  17. name: '图片编号',
  18. field: 'code',
  19. }, {
  20. name: '图片名称',
  21. field: 'name',
  22. }],
  23. };
  24. const pagination = {
  25. pageNo,
  26. pageSize,
  27. totalSize,
  28. };
  29. return (
  30. <StandardCardList
  31. loading={loading}
  32. component={PictureItem}
  33. keepUIState={{ ...UIParams }}
  34. dataSource={dataSource}
  35. header={{ basicSearch, onFilterClick, onCreateClick }}
  36. footer={{ pagination, batchActions, onBatchClick }}
  37. grid={{ gutter: 16, xxl: 12, xl: 6, lg: 4, md: 3, sm: 2, xs: 1 }}
  38. onEdit={onEditClick}
  39. />
  40. );
  41. }
  42. export default PictureCardList;