【每日一包0020】throttle-debounce

[github地址:https://github.com/ABCDdouyae…]

throttle-debounce

函数的节流与防抖

throttle

用法:throttle(delay, callback)

debounce 防抖

用法:throttle(delay, boolean(默认false为非立即执行函数), callback)

[测试用例:https://github.com/ABCDdouyae…]

    原文作者:王炜
    原文地址: https://segmentfault.com/a/1190000017140433
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞