Skip to content

Commit

Permalink
Pagination: input max value won't be less than 1 (ElemeFE#13727)
Browse files Browse the repository at this point in the history
  • Loading branch information
elfman committed Dec 12, 2018
1 parent 16311d1 commit 82fbac8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/pagination/src/pagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,9 +345,9 @@ export default {
computed: {
internalPageCount() {
if (typeof this.total === 'number') {
return Math.ceil(this.total / this.internalPageSize);
return Math.max(1, Math.ceil(this.total / this.internalPageSize));
} else if (typeof this.pageCount === 'number') {
return this.pageCount;
return Math.max(1, this.pageCount);
}
return null;
}
Expand Down

0 comments on commit 82fbac8

Please sign in to comment.