Lodash 去抖动 节流

throttle节流

_.throttle(event => {
    $('#volume_progress_percent').css({ width: `${event.data.percent}%` }); // 更新bootstrap进度条UI
}, 80, { leading: true, trailing: true });

去抖动

posted @ 2020-09-04 14:31  develon  阅读(425)  评论(0编辑  收藏  举报