-
Notifications
You must be signed in to change notification settings - Fork 7
Closed
Labels
bug(错误)Something isn't workingSomething isn't working
Description
if ((isMaxWait && calledCount != 0) || (calledCount == 0 && leading)) {
task(guarantee = true, isDelay = false)
} else {
if (calledCount > 0 && interval < wait) {
clear()
if (trailing) {
task(guarantee = false, isDelay = true)
}
} else {
task(guarantee = false, isDelay = true)
}
}由于通过calledCount == 0 && leading 判断执行了保障任务, leading 只在第一次防抖执行时工作,后续即使已经解除防抖,也不能正常触发 leading
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bug(错误)Something isn't workingSomething isn't working