Browse Source

延迟滚动

lifanagju_citu 11 months ago
parent
commit
1a543bb56c

+ 1 - 1
src/views/personal/myPublicRecruitment/components/bountyDisplay.vue

@@ -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() } // 恢复滚动