/** * 工具类,提供给本库使用,也可以提供给其他库使用 * * @author sunny * @date 2019-09 */ import Utils from "./Utils"; import request from "./Request"; /** * 判断一个值是否是数值 * @function * * @param {any} value * @returns {boolean} */ declare const isNumber: (value: any) => boolean; /** * 字符串是否是数值的字符串形式 * @function * * @param {string} val * @returns {boolean} */ declare function isNumberStr(val: string): boolean; /** * 执行一个字符串定义的函数 * @function * * @param fn 函数字符串 * @returns {any} */ declare function evil(fn: string): any; /** * 判断当前系统是否是Mac系统 (通过浏览器的user-agent) * @function * * @returns {boolean} */ declare function isMac(): boolean; export declare function getLocale(): string; /** * UI翻译函数 * * UI的翻译内容是一个对象,格式如下: * { * "en": { * "a": "A", * "b": "B", * } * } * * 对象默认存储在 window.langMaps 对象中,如果没有,则使用原始内容 * * 当前设置语言可以通过 window.locale 设置,默认为 zh-CN * * @param locale 语言-区域代码: zh-CN, en-US,如果传入null,则使用当前设置的语言 * @param key 翻译内容 * @returns */ export declare function getTranslate(locale: string | null | undefined, key: string | null | undefined): any; export declare const generateId: (num?: number) => string; export { isNumber, isNumberStr, Utils, request, evil, isMac };