Explorar o código

避免人脸识别功能被大量重复点击

Michael Wang %!s(int64=5) %!d(string=hai) anos
pai
achega
72610a1549
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      src/components/FaceRecognition/FaceRecognition.vue

+ 2 - 0
src/components/FaceRecognition/FaceRecognition.vue

@@ -445,6 +445,8 @@ export default {
       } finally {
         this.videoStartPlay();
         this.msg = "开始识别";
+        // 避免人脸识别功能被大量重复点击
+        await new Promise(resolve => setTimeout(() => resolve(), 3000));
         this.disableSnap = false;
       }
     },