dedsudiyu hai 9 meses
pai
achega
bf2b8e7322
Modificáronse 1 ficheiros con 9 adicións e 11 borrados
  1. 9 11
      src/App.vue

+ 9 - 11
src/App.vue

@@ -79,15 +79,17 @@
           getFilesName().then(res=>{
             if(res){
               if(res !== process.env.VUE_APP_RENEWAL_ENCODING){
-                this.$confirm('发现新版本,是否立即刷新页面?', '提示', {
-                  confirmButtonText: '确定',
-                  cancelButtonText: '取消',
-                  type: 'warning'
-                }).then(() => {
+                MessageBox.confirm('发现新版本,是否立即刷新页面?', '系统提示', {
+                    confirmButtonText: '确定',
+                    showCancelButton:true,
+                    closeOnClickModal:false,
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                  }
+                ).then(() => {
                   clearInterval(self.timer);
                   window.location.reload();
-                }).catch(() => {
-                });
+                }).catch(() => {});
               }
             }
           });
@@ -119,10 +121,6 @@
       //清除定时器
       clearInterval(this.timer);
     },
-    destroyed() {
-      //清除定时器
-      clearInterval(this.timer);
-    }
   }
 </script>
 <style>