diff --git a/src/shared/scroll.js b/src/shared/scroll.js index 28ffa5a659dfc1b398b6758f8e4b866ea3e203d1..93ad9b922a681515a1639369b8d318d07f05662b 100644 --- a/src/shared/scroll.js +++ b/src/shared/scroll.js @@ -4,6 +4,7 @@ import { let view let pullToRefreshStyle let disabled +const lastAction = {} export function disableScrollBounce ({ disable @@ -22,7 +23,12 @@ export function disableScrollBounce ({ })) } } - + const time = Date.now() + if (disable === lastAction.disable && time - lastAction.time < 20) { + return + } + lastAction.disable = disable + lastAction.time = time plusReady(() => { if (plus.os.name === 'iOS') { // 延迟执行避免iOS13触摸卡死 @@ -30,5 +36,5 @@ export function disableScrollBounce ({ } else { exec() } - }) -} + }) +}