PAMapp/components/Ui/UiPagination.vue
@@ -1,9 +1,11 @@ <template> <el-pagination :current-page.sync="currentPage" layout="prev, pager, next" :total="totalList.length" :page-size="pageSize" @current-change="handleCurrentChange" class="mt-10" > </el-pagination> </template> @@ -28,6 +30,11 @@ } handleCurrentChange(currentPage: number) { if (this.totalList.length <= this.pageSize && currentPage !== 1) { currentPage -= 1; } if (this.totalList) { this.pageList = this.totalList.slice(this.pageSize * currentPage - this.pageSize, this.pageSize * currentPage) this.chagnePage();