From 75cfe2f8f77a641469d62c8bf8d3c6a00a5604f1 Mon Sep 17 00:00:00 2001
From: 若依 <yzz_ivy@163.com>
Date: 星期六, 23 四月 2022 22:04:12 +0800
Subject: [PATCH] Merge pull request #48 from JavaLionLi/patch-1
---
src/components/Pagination/index.vue | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/components/Pagination/index.vue b/src/components/Pagination/index.vue
index 5b6d718..f67f5cc 100644
--- a/src/components/Pagination/index.vue
+++ b/src/components/Pagination/index.vue
@@ -3,7 +3,7 @@
<el-pagination
:background="background"
v-model:current-page="currentPage"
- :page-size="pageSize"
+ v-model:page-size="pageSize"
:layout="layout"
:page-sizes="pageSizes"
:pager-count="pagerCount"
@@ -77,7 +77,9 @@
}
})
function handleSizeChange(val) {
- pageSize.value = val
+ if (currentPage.value * val > props.total) {
+ currentPage.value = 1
+ }
emit('pagination', { page: currentPage.value, limit: val })
if (props.autoScroll) {
scrollTo(0, 800)
--
Gitblit v1.9.3