UNPKG

@fmdevui/fm-dev

Version:

Page level components developed based on Element Plus.

47 lines (46 loc) 1.38 kB
import { AxiosResponseHeaders, RawAxiosResponseHeaders } from 'axios'; /** * Download online pictures * @param url * @param filename * @param mime * @param bom */ export declare function downloadByOnlineUrl(url: string, filename: string, mime?: string, bom?: BlobPart): void; /** * Download pictures based on base64 * @param buf * @param filename * @param mime * @param bom */ export declare function downloadByBase64(buf: string, filename: string, mime?: string, bom?: BlobPart): void; /** * Download according to the background interface file stream * @param {*} data * @param {*} filename * @param {*} mime * @param {*} bom */ export declare function downloadByData(data: BlobPart, filename: string, mime?: string, bom?: BlobPart): void; /** * Download file according to file address * @param {*} sUrl */ export declare function downloadByUrl({ url, target, fileName }: { url: string; target?: string; fileName?: string; }): boolean; export declare function openWindow(url: string, opt?: { target?: string | string; noopener?: boolean; noreferrer?: boolean; }): void; export declare function getFileName(headers: RawAxiosResponseHeaders | AxiosResponseHeaders): any; /** * 文件流下载 * @param res * @param fileName 文件名 */ export declare function downloadStreamFile(res: any, fileName?: string | undefined): void;