Logo white

other / mew-iview

Sign in
  • Sign in
  • Project
  • Files
  • Commits
  • Network
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Labels
  • Wiki
  • mew-iview
  • src
  • components
  • select
  • utils.js
  • Optimize append and remove options
    9c32a056
    Sergio Crisostomo authored
    2017-09-03 08:49:45 +0200  
    Browse Code ยป
utils.js 337 Bytes
Edit Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14
export function debounce(fn) {
    let waiting;
    return function() {
        if (waiting) return;
        waiting = true;
        const context = this,
            args = arguments;
        const later = function() {
            waiting = false;
            fn.apply(context, args);
        };
        this.$nextTick(later);
    };
}