/** * 脚本帮助类 */ declare class ScriptHelper { /** * 异步加载脚本/样式内容,把内容处理为行内html * 这种方式,依赖的内部资源,会从当前站点加载 */ static loadContentAsync: (src: string | string[]) => Promise; /** * 异步加载单个路径下的多个文件 */ static loadPathAsync: (path: string, files: string[]) => Promise; /** * 通过注入DOM标签异步加载脚本或样式表 */ static loadAsync: (src: string | string[]) => Promise; /** * 注意:箭头函数没有参数 */ static loadAll: (...args: any[]) => Promise; /** * 根据路径获取标签(无src) */ static getInnerTagByUrl: (url: string) => HTMLStyleElement | HTMLScriptElement; /** * 根据路径获取待加载的元素,同时包含Url */ static getOuterTagByUrl: (url: string) => HTMLLinkElement | HTMLScriptElement; } export default ScriptHelper;