Browse Source

perf: useSmoothSwipe的haveSwipedThistime判断标准更严格一些

任一存 1 year ago
parent
commit
6ce9f79fda
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/useFunctions/useSmoothSwipe.js

+ 2 - 1
src/useFunctions/useSmoothSwipe.js

@@ -58,7 +58,8 @@ export default function useSmoothSwipe({
 
   //
   watch(moveSpeed, (v) => {
-    if (!haveSwipedThisTime.value && v) {
+    console.log(v)
+    if (!haveSwipedThisTime.value && Math.abs(v) > 0.1) {
       haveSwipedThisTime.value = true
     }
   })