|
@@ -112,7 +112,7 @@ const scroll = () => {
|
|
|
}
|
|
|
}
|
|
|
// 不断滚动
|
|
|
- setTimeout(() => { scrollItem.value = requestAnimationFrame(scroll) }, 20) // 20 : 1px。即:1秒滚动50px
|
|
|
+ setTimeout(() => { scrollItem.value = requestAnimationFrame(scroll) }, 20) // 延迟滚动-> 20 : 1px。即:1秒滚动50px
|
|
|
}
|
|
|
const handleMouseover = () => { cancelAnimationFrame(scrollItem.value) } //暂停滚动
|
|
|
const handleMouseleave = () => { scroll() } // 恢复滚动
|