Bläddra i källkod

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

任一存 1 år sedan
förälder
incheckning
6ce9f79fda
1 ändrade filer med 2 tillägg och 1 borttagningar
  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
     }
   })