更新依赖

This commit is contained in:
lyswhut
2020-11-10 10:59:45 +08:00
parent b820adf0bf
commit 4cdd2110a6
9 changed files with 71 additions and 57 deletions
+1 -1
View File
@@ -132,7 +132,7 @@ const handleScroll = (element, to, duration = 300, fn = () => {}) => {
* @param {*} fn 滚动完成后的回调
* @param {*} delay 延迟执行时间
*/
export const scrollTo = (element, to, duration = 300, fn = () => {}, delay) => {
export const scrollTo = (element, to, duration = 300, fn = () => {}, delay = 0) => {
let cancelFn
let timeout
if (delay) {