/** * 导出Excel文件 * @description 将Blob数据导出为Excel文件,支持IE和其他现代浏览器 * @param {Blob} data - 接口返回的blob数据 * @param {string} [name='excel'] - 导出的文件名(不带扩展名) * @param {(result: ExportResult) => void} [callBack] - 导出结果回调函数 * @returns {boolean} 如果数据为空返回false,否则返回true * @throws {TypeError} 当data参数不是Blob类型时抛出 * @example * exportXls(blobData, 'report', (result) => { * if (result.type === 'success') { * console.log('导出成功'); * } else { * console.log(`导出失败: ${result.msg}`); * } * }); */ export declare function exportXls(data: Blob, name?: string, callBack?: (result: ExportResult) => void): boolean; /** * 导出结果类型 */ type ExportResult = { type: 'success'; } | { type: 'fail'; code?: number; msg?: string; }; export {};