index.d.ts 759 B

12345678910111213141516171819202122232425
  1. /**
  2. * 快照插件,生成视图
  3. */
  4. declare class Snapshot {
  5. static pluginName: string;
  6. lf: any;
  7. offsetX: number;
  8. offsetY: number;
  9. fileName: string;
  10. customCssRules: string;
  11. useGlobalRules: boolean;
  12. constructor({ lf }: {
  13. lf: any;
  14. });
  15. getSvgRootElement(lf: any): any;
  16. triggerDownload(imgURI: string): void;
  17. removeAnchor(element: any): void;
  18. getSnapshot(fileName: string, backgroundColor: string): void;
  19. getSnapshotBase64(backgroundColor: string): Promise<unknown>;
  20. getSnapshotBlob(backgroundColor: string): Promise<unknown>;
  21. getClassRules(): string;
  22. getCanvasData(svg: SVGGraphicsElement, backgroundColor: string): Promise<unknown>;
  23. }
  24. export default Snapshot;
  25. export { Snapshot, };