소스 검색

Pagination: input max value won't be less than 1 (#13727)

Pagination: input max value won't be less than 1 (#13727)
Harlan 6 년 전
부모
커밋
4f93968db4
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      packages/pagination/src/pagination.js

+ 2 - 2
packages/pagination/src/pagination.js

@@ -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;
     }