mirror of
https://gitee.com/gz-yami/mall4v.git
synced 2026-03-22 08:07:17 +08:00
移除空行
This commit is contained in:
@@ -7,13 +7,10 @@ export const Debounce = (fn, t) => {
|
|||||||
if (timer) {
|
if (timer) {
|
||||||
clearTimeout(timer)
|
clearTimeout(timer)
|
||||||
}
|
}
|
||||||
|
|
||||||
const callNow = !timer
|
const callNow = !timer
|
||||||
|
|
||||||
timer = setTimeout(() => {
|
timer = setTimeout(() => {
|
||||||
timer = null
|
timer = null
|
||||||
}, delay)
|
}, delay)
|
||||||
|
|
||||||
if (callNow) fn.apply(this, args)
|
if (callNow) fn.apply(this, args)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user