Browse Source

清楚欢迎modal的定时器

Michael Wang 6 năm trước cách đây
mục cha
commit
3e6f622063
1 tập tin đã thay đổi với 5 bổ sung1 xóa
  1. 5 1
      src/features/OnlineExam/OnlineExamHome.vue

+ 5 - 1
src/features/OnlineExam/OnlineExamHome.vue

@@ -54,12 +54,16 @@ export default {
                 </div>
               </div>
             </div>
-          )
+          ),
+          onOk: () => {
+            clearInterval(this.interval);
+          }
         });
         this.interval = setInterval(() => {
           this.autoCloseModal--;
           if (this.autoCloseModal <= 0) {
             this.$Modal.remove();
+            clearInterval(this.interval);
           }
         }, 1000);
       }