From a6c5e6eff59934e47538149c4fc1e21104b6bf35 Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Thu, 15 Aug 2024 10:47:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=82=B9=E5=87=BB=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/noclick.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/common/noclick.js b/src/common/noclick.js index 6fe72a29..391ee043 100644 --- a/src/common/noclick.js +++ b/src/common/noclick.js @@ -23,17 +23,17 @@ function noMultipleClicks(methods, info) { // 节流函数 const throttle = (fn, t,_this) => { - console.log('throttle') - return ()=> { - if (!_this.timer) { - _this.timer = setTimeout(()=>{ - fn() - console.log('fn') - //·清空定时器 - _this.timer = null - }, t) - } - } + console.log('throttle') + return ()=> { + if (!_this.timer) { + _this.timer = setTimeout(()=>{ + console.log('fn') + //·清空定时器 + _this.timer = null + }, t) + fn() + } + } }