People: Disable loadMore() and refresh() while tab is inactive #22
This commit is contained in:
parent
582a330837
commit
46a25548c4
2 changed files with 16 additions and 4 deletions
|
@ -373,7 +373,9 @@ export default {
|
|||
this.lastId = "";
|
||||
},
|
||||
loadMore() {
|
||||
if (this.scrollDisabled) return;
|
||||
if (this.scrollDisabled || !this.active) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.scrollDisabled = true;
|
||||
this.listen = false;
|
||||
|
@ -456,11 +458,15 @@ export default {
|
|||
return params;
|
||||
},
|
||||
refresh() {
|
||||
if (this.loading) return;
|
||||
if (this.loading || !this.active) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.page = 0;
|
||||
this.dirty = true;
|
||||
this.scrollDisabled = false;
|
||||
|
||||
this.loadMore();
|
||||
},
|
||||
search() {
|
||||
|
|
|
@ -420,7 +420,9 @@ export default {
|
|||
this.lastId = "";
|
||||
},
|
||||
loadMore() {
|
||||
if (this.scrollDisabled) return;
|
||||
if (this.scrollDisabled || !this.active) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.scrollDisabled = true;
|
||||
this.listen = false;
|
||||
|
@ -503,11 +505,15 @@ export default {
|
|||
return params;
|
||||
},
|
||||
refresh() {
|
||||
if (this.loading) return;
|
||||
if (this.loading || !this.active) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.page = 0;
|
||||
this.dirty = true;
|
||||
this.scrollDisabled = false;
|
||||
|
||||
this.loadMore();
|
||||
},
|
||||
search() {
|
||||
|
|
Loading…
Reference in a new issue