Skip to content

Commit

Permalink
fix: 增加窗口变化事件过滤时间间隔
Browse files Browse the repository at this point in the history
  • Loading branch information
zhetengbiji committed Jan 26, 2019
1 parent d21e1b2 commit 74754f4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/platforms/h5/service/api/window.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ var tasks = []
function onResize () {
tasks.push(setTimeout(() => {
tasks.forEach(task => clearTimeout(task))
tasks.length = 0

const {
invokeCallbackHandler: invoke
Expand All @@ -29,7 +30,7 @@ function onResize () {
}
})
})
}, 10))
}, 20))
}
/**
* 监听窗口大小变化
Expand Down

0 comments on commit 74754f4

Please sign in to comment.