|
@@ -19,8 +19,8 @@ export default {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
this.loading = true;
|
|
this.loading = true;
|
|
|
- this.finished = false;
|
|
|
|
|
- this.empty = false;
|
|
|
|
|
|
|
+ // this.finished = false;
|
|
|
|
|
+ // this.empty = false;
|
|
|
let data = { page: this.page, size: 20, sort: 'createdAt,desc' };
|
|
let data = { page: this.page, size: 20, sort: 'createdAt,desc' };
|
|
|
if (this.beforeData) {
|
|
if (this.beforeData) {
|
|
|
data = {
|
|
data = {
|
|
@@ -30,13 +30,18 @@ export default {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
this.$http.post(this.url, data, { body: 'json' }).then(res => {
|
|
this.$http.post(this.url, data, { body: 'json' }).then(res => {
|
|
|
- this.list = [...this.list, ...res.content];
|
|
|
|
|
- this.empty = res.empty;
|
|
|
|
|
- this.loading = false;
|
|
|
|
|
- this.finished = res.last;
|
|
|
|
|
- if (!this.finished) {
|
|
|
|
|
- this.page = this.page + 1;
|
|
|
|
|
|
|
+ if (this.setList) {
|
|
|
|
|
+ this.setList(res.content);
|
|
|
}
|
|
}
|
|
|
|
|
+ this.totalPages = res.totalPages;
|
|
|
|
|
+ this.totalElements = res.totalElements;
|
|
|
|
|
+ // this.list = [...this.list, ...res.content];
|
|
|
|
|
+ // this.empty = res.empty;
|
|
|
|
|
+ this.loading = false;
|
|
|
|
|
+ // this.finished = res.last;
|
|
|
|
|
+ // if (!this.finished) {
|
|
|
|
|
+ // this.page = this.page + 1;
|
|
|
|
|
+ // }
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
onSearch() {
|
|
onSearch() {
|