lilei %!s(int64=2) %!d(string=hai) anos
pai
achega
11611ebb23
Modificáronse 2 ficheiros con 11 adicións e 1 borrados
  1. 1 1
      public/version.json
  2. 10 0
      src/App.vue

+ 1 - 1
public/version.json

@@ -1,5 +1,5 @@
 {
   "message": "发现有新版本发布,确定更新系统?",
   "vendorJsVersion": "",
-  "version": 1678756698116
+  "version": 1678758332612
 }

+ 10 - 0
src/App.vue

@@ -45,6 +45,16 @@ export default {
     window.addEventListener('visibilitychange',()=>{
       this.$store.state.app.visibilityState = document.visibilityState == 'visible'
     })
+    window.addEventListener('focus',(e)=>{
+      if(!this.$store.state.app.visibilityState){
+        this.$store.state.app.visibilityState = true
+      }
+    })
+    window.addEventListener('blur',(e)=>{
+      if(!this.$store.state.app.visibilityState){
+        this.$store.state.app.visibilityState = false
+      }
+    })
     this.$message.config({
       top: `100px`,
       duration: 3,