/** * 通用导出组件 */ import React from 'react'; import create from './createExporter'; export * from './createExporter'; export interface Showable { show(): void; } export interface ProgressEvent { success?: boolean; progress: number; error?: Error; result: { message?: string; taskResult: any; }; } export interface ExportProps { title?: string; onStart: (scope: ExportScope) => Promise; onProgress: (taskId: string) => Promise; onSuccess?: (downloadUrl: string) => {}; onClose?: () => void; onDownLoad?: (downloadUrl: string) => void; showScope?: boolean; initialScope?: ExportScope; allText?: string; footer?: React.ReactNode; currentText?: string; label?: string; } export declare enum ExportScope { All = "all", Current = "current" } declare enum ExportState { INIT = 0, EXPORTING = 1, EXPORTED = 2, EXPORT_FAIL = 3 } interface State { scope: ExportScope; visible: boolean; status: ExportState; error?: Error; progress: number; message?: string; } export default class Export extends React.Component implements Showable { static defaultProps: { title: string; allText: string; currentText: string; label: string; showScope: boolean; }; static create: typeof create; state: State; private taskId?; private downloadUrl?; render(): JSX.Element; show(): void; private handleScopeChange; private handleExport; private startExport; private handleCheckProgress; private handleCancel; private reset; }