mirror of
https://github.com/ElemeFE/element.git
synced 2025-12-16 11:44:01 +08:00
Pagination: input max value won't be less than 1 (#13727)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user