Options
All
  • Public
  • Public/Protected
  • All
Menu

Module src/function/throttle

Index

Functions

Functions

default

  • default(fn: (...args: any[]) => void, wait: number): () => void
  • description

    节流函数 当持续触发事件时,每隔一段时间,只执行一次事件 适用于resizescroll等函数的调用频率

    Parameters

    • fn: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • wait: number

    Returns () => void

      • (): void
      • Returns void

Generated using TypeDoc