1.1.3 • Published 2 years ago

@deot/helper-load v1.1.3

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

@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');
1.1.3

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.1

2 years ago