tableConfig.tsx 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. import { TableProps } from "antd"
  2. import React from "react"
  3. let columns = (): TableProps<any>['columns'] => {
  4. return [
  5. {
  6. title: '产品名称',
  7. dataIndex: 'marketingAssetName',
  8. key: 'marketingAssetName',
  9. ellipsis: true,
  10. render: (a: any, b: any) => {
  11. return <span style={{ fontSize: "12px" }}>{a}</span>
  12. }
  13. },
  14. {
  15. title: '商品封面',
  16. dataIndex: 'productImageUrl',
  17. key: 'productImageUrl',
  18. ellipsis: true,
  19. align: 'center',
  20. render: (a: any, b: any) => {
  21. return <img src={a} style={{ height: 35 }} />
  22. }
  23. },
  24. {
  25. title: '书城',
  26. dataIndex: 'mall',
  27. key: 'mall',
  28. ellipsis: true,
  29. align: 'center',
  30. render: (a: any) => {
  31. return <span style={{ fontSize: "12px" }}>{a}</span>
  32. }
  33. },
  34. {
  35. title: '分类',
  36. dataIndex: 'fictionType',
  37. key: 'fictionType',
  38. align: 'center',
  39. ellipsis: true,
  40. render: (a: any, b: any) => {
  41. return <span style={{ fontSize: "12px" }}>{a}</span>
  42. }
  43. },
  44. ]
  45. }
  46. export default columns