chengsc
2024-10-23 0f925aa31ef78144d24878433302917c33d04c8d
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);
    };
}