import { RefObject } from 'react'; import { Json } from '@befe/brick-utils'; export type DownloadIframeMethod = 'get' | 'post'; /** * DownloadIframe `startMessageDelay` 默认值 */ export declare const DOWNLOAD_IFRAME_START_MESSAGE_DELAY = 300; export interface DownloadIframeProps { /** * 自定义 class */ className?: string; /** * 下载地址 */ url?: string; /** * 请求方法 */ method?: DownloadIframeMethod; /** * 请求参数 * { [key]: string | number } */ params?: Record; /** * 请求成功的回调 */ onResponse?: (respJson: Json, respText: string) => void; /** * request 响应成功的判断函数 */ isResponseSuccess?: (respJson: Json, respText: string) => boolean; /** * 开始下载消息延迟出现时间 * - 小于等于 0: 不触发延时 * - 大于 0: 延迟触发 * * @default 300 */ startMessageDelay?: number; /** * 开始下载消息持续时间 */ startMessageDuration?: number; } /** * DownloadIframe 对外实例句柄(经 ref 调用) */ export interface DownloadIframeHandle { download: () => void; refIframe: RefObject; } export declare const DownloadIframe: import("react").ForwardRefExoticComponent>;