林旭祥 hace 3 semanas
padre
commit
dfd308f6c9
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  1. 3 2
      src/views/game/components/basketball.vue

+ 3 - 2
src/views/game/components/basketball.vue

@@ -39,6 +39,9 @@ const { bodyposeData, clientObj, boxes, proportion, myThrow, direction } = toRef
 watch(
   () => myThrow.value,
   (newData, oldData) => {
+    if (oldData == undefined) {
+      return false;
+    }
     console.log("ppp", oldData, newData)
     if (newData == 1) {
       console.log("投篮")
@@ -46,9 +49,7 @@ watch(
       setTimeout(() => {
         handleMouseUp();
       }, 100)
-
     } else {
-
     }
   },
   { immediate: true }