/**
 * v-debounce指令
 * 用于防止重复点击
 */
export default {
  inserted(el: any, binding: any) {
    let timer: any
    el.addEventListener('click', () => {
      if (timer) {
        clearTimeout(timer)
      }
      timer = setTimeout(() => {
        binding.value()
      }, 1500)
    })
  },
}
