Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Method

Hierarchy

  • Method

Index

Methods

debounce

  • debounce(fn: Function, delay?: undefined | number, option?: undefined | object): Function
  • description

    防抖装饰器

    example
    const func = () => { doSomething() }
    const funcThrottle = utils.debounce(func)

    Parameters

    • fn: Function
    • Optional delay: undefined | number
    • Optional option: undefined | object

    Returns Function

debounceWrap

  • debounceWrap(delay?: undefined | number, option?: undefined | object): Function
  • description

    防抖装饰器

    example
    @utils.decorator(800) // 在需要防抖的方法上添加装饰器进行包装
    inputEnter(e) {}

    Parameters

    • Optional delay: undefined | number
    • Optional option: undefined | object

    Returns Function

throttle

  • throttle(fn: Function, delay?: undefined | number, option?: undefined | object): Function
  • description

    节流函数

    example
    const func = () => { doSomething() }
    const funcThrottle = utils.throttle(func)

    Parameters

    • fn: Function
    • Optional delay: undefined | number
    • Optional option: undefined | object

    Returns Function

throttleWrap

  • throttleWrap(delay?: undefined | number, option?: undefined | object): Function
  • description

    节流装饰器

    example
    @utils.throttle(800) // 在需要节流的方法上添加装饰器进行包装
    inputEnter(e) {}

    Parameters

    • Optional delay: undefined | number
    • Optional option: undefined | object

    Returns Function

Generated using TypeDoc