@deot/helper-load
v1.1.3
Published
### `Load`
Downloads
1
Readme
@deot/helper-load
Load
import * as Load from "@deot/helper-load";
// or
import { Load } from "@deot/helper";
link
Load.link(url: string, options: object)
加载css
- url: 链接
- options: 可配置参数
示例
Load.link('https://*.github.io');
style
Load.style(code: string, options: object)
注入style
- code: 代码块
- options: 可配置参数
options: 规则:
- id: string 避免重复创建
示例
Load.style('#test { font-size: 12px }');
removeStyle
Load.removeStyle(id: string)
删除cssCode
- id: string 避免重复创建
示例
Load.removeStyle('test');
script
Load.script(url: string, options: object)
加载js
- url: 链接
- options: 可配置参数
示例
Load.script('https://*.github.io');
image
Load.image(url: string, options: object)
加载image
- url: 链接
- options: 可配置参数
示例
Load.image('https://*.github.io');