/*
 * @Author: wjc
 * @Date: 2024-05-11 10:50:56
 * @LastEditors: wjc
 * @LastEditTime: 2024-05-11 10:51:00
 * @Description:
 */
export default class {
  constructor () {
    throw new Error('该类不能被实例化')
  }

  // 防抖动
  static debounce (fn, delay = 200) {
    let timer = null
    return function () {
      let context = this
      let args = arguments

      clearTimeout(timer)
      timer = setTimeout(function () {
        fn.apply(context, args)
      }, delay)
    }
  }
}
