1.0.21 • Published 4 years ago

xmiot-function v1.0.21

Weekly downloads
19
License
ISC
Repository
-
Last release
4 years ago

xmiot-function 包使用说明

  • getQueryString(name)

    获取连接中参数

  • getHashString(name)

    获取 hash 连接中参数

  • generateRandom(n)

    获取n为 随机数 默认值32

  • formatDate(time, char = '-')

    time 时间戳戳 char 时间 连接-或者/

  • FormatDate(time, format = 'YY-MM-DD hh:mm:ss')

    time 时间戳 第二个参数 时间格式 可以自定义 比如 :formatDate(new Date().getTime(),'今天是YY/MM/DD hh:mm:ss'); //今天是2017/05/12 10:07:45

  • formatDuration(time)

    播放时长转换

  • transPlayCount(count)

    播放数量 转换

  • throttle (fn, delay) 节流函数

  • addEventHandle(target, type, fn, capture)

    添加 监听 函数 target 针对的 目标对象 type 类型 比如 scroll fn 方法 capture 布尔

  • removeEventHandle (target, type, fn, capture)

    移出监听事件

  • ScrollTop(number = 0, time)

    number 移动的距离 time 需要的时间

  • getFetchingLock(timeout) // 避免重复获取异步资源

  • getData(key) // 获取本地存储

  • setData (key, item) // 设置 本地存储

1.0.21

4 years ago

1.0.19

4 years ago

1.0.18

4 years ago

1.0.17

4 years ago

1.0.20

4 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago