/** * 是否为空值,包括 null、undefined、'' 和 NaN */ export declare function isNullValue(value: any): boolean; export type FindByValueType = string | number | boolean | null | undefined; /** * 找到任意属性 key 对应的值和目标值相等的数组对象 */ export declare function findBy>(array: T[], key: string, value: FindByValueType): T; /** * 找到属性 value 对应的值和目标值相等的数组对象 */ export declare function findByValue(array: T[], value: FindByValueType): T; declare global { interface Window { routerBase?: string; displayMode?: 'default' | 'embed'; } } /** * 页面跳转,不同于 history.push() 仅支持同一标签页下跳转,directTo 常用于新开标签页跳转 * @param {string} url 跳转链接,支持相对链接和绝对链接 * @param {boolean} blank 是否新开标签页 */ export declare function directTo(url: string, blank?: boolean): void; /** * 文件下载,支持下载格式为 Blob、File、ArrayBuffer 和 string 的文件 * @param {Blob | File | ArrayBuffer | string} content 下载内容 * @param {string} fileName 下载后保存的文件名 * @param {BlobPropertyBag} options BlobPropertyBag 字典,可参考 https://developer.mozilla.org/zh-CN/docs/Web/API/Blob/Blob#%E5%8F%82%E6%95%B0 */ export declare function downloadFile(content: Blob | File | ArrayBuffer | string, fileName: string, options?: BlobPropertyBag): void; /** * 接收一个 value 转换为数组 * @param {any | any[]} value */ export declare function toArray(value?: T | T[] | null): T[];