resize 节流防抖
时间: 2023-08-26 09:16:54 浏览: 155
在实际应用中,防抖和节流常用于对resize事件做处理。防抖函数可以确保在resize事件触发时只执行一次操作,避免频繁重绘或请求接口。而节流函数则可以控制resize事件的触发频率,例如每隔一定时间执行一次操作。 <span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [防抖和节流](https://blog.csdn.net/weixin_49334139/article/details/125404842)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [resize函数防抖和节流写法](https://blog.csdn.net/dreamjay1997/article/details/91862686)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [js节流防抖应用场景,以及在vue中节流防抖的具体实现操作](https://blog.csdn.net/yetaodiao/article/details/127371795)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文