UNPKG

tzcloud-element-pro

Version:

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

22 lines (18 loc) 457 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.debounce = debounce; function debounce(fn) { var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 50; var context, args, timer; function later() { fn.apply(context, args); clearTimeout(timer); } return function () { context = this, args = arguments; clearTimeout(timer); timer = setTimeout(later, wait); }; }