摘要:
节流是指连续触发事件但在 n 秒内只执行一次函数。 使用场景 滚动加载更多 鼠标移动事件 按钮频繁点击 游戏中的按键处理 function throttle(func, delay, options = {}) { let timeoutId = null; let lastTime = 0; co 阅读全文
posted @ 2025-11-25 11:35
howhy
阅读(32)
评论(0)
推荐(0)
摘要:
Function.prototype.myCall=function(context,...args){ context=context==null ? globalThis : Object(context); const fnKey=Symbol('fn'); context[fnKey]=th 阅读全文
posted @ 2025-11-25 11:29
howhy
阅读(15)
评论(0)
推荐(0)

浙公网安备 33010602011771号