|
@@ -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,
|