index.d.ts 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. declare type SaveCallback = (saveTemplate: string, callback: (result: boolean) => void) => void;
  2. export default class ReportApi {
  3. /**
  4. *设计模板
  5. *
  6. * @param {string} fileName 模板
  7. * @param {string} tempData 临时演示数据
  8. * @memberof ReportApi
  9. */
  10. static designerReport(template: string, tempData: string, saveCallback: SaveCallback): void;
  11. /**
  12. *打印预览
  13. *
  14. * @param {string} fileName 模板路径
  15. * @param {string} jsonData 数据
  16. * @memberof ReportApi
  17. */
  18. static reportShowPreview(fileName: string, jsonData: string): void;
  19. /**
  20. *打印
  21. *
  22. * @param {string} fileName 模板路径
  23. * @param {string} jsonData 数据
  24. * @memberof ReportApi
  25. */
  26. static reportPrinter(fileName: string, jsonData: string, isSelectPrinter: boolean): void;
  27. /**
  28. * 打印到图片(返回base64图片)
  29. *
  30. * @param {string} fileName 模板路径
  31. * @param {string} jsonData 数据
  32. * @memberof ReportApi
  33. */
  34. static reportToImage(fileName: string, jsonData: string): string;
  35. }
  36. export {};