UNPKG

tzcloud-element-pro

Version:

A super practical component library that developed by vue2.x and element-ui

14 lines (12 loc) 286 B
export function debounce(fn, wait = 50) { let context, args, timer function later() { fn.apply(context, args) clearTimeout(timer) } return function () { context = this, args = arguments clearTimeout(timer) timer = setTimeout(later, wait) } }