mounted() {
this.getData();
let _this = this;
document.addEventListener("visibilitychange", function() {
if (document.hidden) {
console.log('隐藏了')
} else {
console.log('显示了')
_this.getData();
}
})
},
mounted() {
this.getData();
let _this = this;
document.addEventListener("visibilitychange", function() {
if (document.hidden) {
console.log('隐藏了')
} else {
console.log('显示了')
_this.getData();
}
})
},