|
@@ -112,10 +112,10 @@ const scroll = () => {
|
|
|
}
|
|
|
}
|
|
|
// 不断滚动
|
|
|
- setTimeout(() => { scrollItem.value = requestAnimationFrame(scroll) }, 20) // 延迟滚动-> 20 : 1px。即:1秒滚动50px
|
|
|
+ setTimeout(() => { scrollItem.value = requestAnimationFrame(scroll) }, 30) // 延迟滚动-> 20 : 1px。即:1秒滚动50px
|
|
|
}
|
|
|
-const handleMouseover = () => { cancelAnimationFrame(scrollItem.value) } //暂停滚动
|
|
|
-const handleMouseleave = () => { scroll() } // 恢复滚动
|
|
|
+// const handleMouseover = () => { cancelAnimationFrame(scrollItem.value) } //暂停滚动
|
|
|
+// const handleMouseleave = () => { scroll() } // 恢复滚动
|
|
|
onMounted(() => {
|
|
|
// 如果数据长度形成的总高度少于容器高度,不设置滚动
|
|
|
const clientHeight = scrollRef.value?.clientHeight
|