@deot/helper-load
TypeScript icon, indicating that this package has built-in type declarations

1.1.3 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i @deot/helper-load

Weekly Downloads

7

Version

1.1.3

License

MIT

Unpacked Size

15.8 kB

Total Files

7

Last publish

Collaborators

  • deot