1.0.1 • Published 2 years ago
reduce-flow v1.0.1
节流:是将多次执行变为每隔一段时间执行。
应用场景:mousemove mousedown keydown scroll
使用方法
import { throttle } from "reduce-flow";
document.onmousemove = throttle(function () {
console.log("函数节流");
});
import { throttle } from "reduce-flow";
document.onmousemove = throttle(function () {
console.log("函数节流");
});