ActionRender.ts 513 B

123456789101112131415161718192021222324252627282930
  1. export interface ActionRenderProps {
  2. /**
  3. * 操作条目
  4. */
  5. actions: Array<ActionRenderItem>;
  6. }
  7. export interface ActionRenderItem {
  8. /**
  9. * 按钮文字
  10. */
  11. text: string,
  12. /**
  13. * 按钮键值
  14. */
  15. key?: string,
  16. /**
  17. * 这个按钮是否换行,默认否
  18. */
  19. wrap?: boolean,
  20. /**
  21. * 按钮类型
  22. */
  23. type?: 'primary'|'danger'|'success'|'warning'|'secondary',
  24. /**
  25. * 按钮点击回调
  26. */
  27. onClick?: (key: string|undefined, record: Record<string, unknown>) => void;
  28. }