43.Vue中使用Lodash 节流(throttle)和防抖(debounce)函数

1、节流(throttle): 创建一个节流函数,在等待时间内最多执行 一次的函数
2、防抖(debounce):创建一个 debounced(防抖动)函数,该函数会从上一次被调用后,延迟多少时间后调用方法,如果不停执行函数,执行时间被覆盖

案例



lodash中文文档

你可能感兴趣的:(43.Vue中使用Lodash 节流(throttle)和防抖(debounce)函数)