Open kai-phan opened 1 month ago
const VDebounceClick = { mounted(el, binding) { const { arg, value } = binding; const num = Number(arg); let timer; el.onclick = (e) => { clearTimeout(timer); timer = setTimeout(() => { value(e) }, num) } } }