// 防抖
function debounce(func, wait = 300) {
let timeout;
return function (event) {
clearTimeout(timeout);<
vue中对提交等按钮做防抖处理
最新推荐文章于 2024-05-17 06:25:09 发布
// 防抖function debounce(func, wait = 300) { let timeout; return function (event) { clearTimeout(timeout); timeout = setTimeout(() => { func.call(this, event); }, wait); };}// 提交按钮中使用handleSubmit: debou
摘要由CSDN通过智能技术生成