DesignPic_20250812153835.tsx 959 B

123456789101112131415161718192021222324252627282930313233343536
  1. import React from 'react'
  2. import { Button, Table } from '@alifd/next';
  3. export default function DesignPic() {
  4. const dataSource = () => {
  5. const result = [];
  6. for (let i = 0; i < 5; i++) {
  7. result.push({
  8. title: { name: `Quotation for 1PCS Nano ${3 + i}.0 controller compatible` },
  9. id: 100306660940 + i,
  10. time: 2e3 + i,
  11. });
  12. }
  13. return result;
  14. };
  15. const render = (value: any, index: number, record: any) => {
  16. return (
  17. <a href="javascript:;">
  18. {'Remove('}
  19. {record.id}
  20. {')'}
  21. </a>
  22. );
  23. };
  24. return (
  25. <div className='w-px-750 h-px-500'>
  26. <Button>按钮</Button>
  27. <Table dataSource={dataSource()}>
  28. <Table.Column title="Id" htmlTitle="Unique Id" dataIndex="id" />
  29. <Table.Column title="Title" dataIndex="title.name" />
  30. <Table.Column title="Time" dataIndex="time" />
  31. <Table.Column cell={render} />
  32. </Table>
  33. </div>
  34. )
  35. }