Skip to content

Commit

Permalink
Update Page Generation
Browse files Browse the repository at this point in the history
Updated how number of pages was determined.
  • Loading branch information
SalleeMatthew authored and smile0711 committed Oct 28, 2024
1 parent b7ba43e commit 0b97e40
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
5 changes: 1 addition & 4 deletions spa/src/pages/mall/staff/pending.vue
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,7 @@ export default Vue.extend({
this.totalCount = response.data.objects.total[0].count;
this.objects = response.data.objects.objects;
this.showSuccess = true;
let pages = Math.round(this.totalCount/this.limit);
if(pages < this.totalCount/this.limit){
pages++
}
let pages = Math.ceil(this.totalCount/this.limit);
for(let i = 1; pages >= i; i++){
this.pages.push(i);
}
Expand Down
5 changes: 1 addition & 4 deletions spa/src/pages/mall/staff/stocked.vue
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,7 @@ export default Vue.extend({
this.totalCount = response.data.objects.total[0].count;
this.objects = response.data.objects.objects;
this.showSuccess = true;
let pages = Math.round(this.totalCount/this.limit);
if(pages < this.totalCount/this.limit){
pages++
}
let pages = Math.ceil(this.totalCount/this.limit);
for(let i = 1; pages >= i; i++){
this.pages.push(i);
}
Expand Down
5 changes: 1 addition & 4 deletions spa/src/pages/mall/staff/warehouse.vue
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,7 @@ export default Vue.extend({
this.totalCount = response.data.objects.total[0].count;
this.objects = response.data.objects.objects;
this.showSuccess = true;
let pages = Math.round(this.totalCount/this.limit);
if(pages < this.totalCount/this.limit){
pages++
}
let pages = Math.ceil(this.totalCount/this.limit);
for(let i = 1; pages >= i; i++){
this.pages.push(i);
}
Expand Down

0 comments on commit 0b97e40

Please sign in to comment.