<div class="pagination" v-if="pageshow"> <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page.sync="cur_page" :page-size="10" layout="total, prev, pager, next, jumper" :total="recordsTotal"> </el-pagination> </div>
在搜索改變頁碼的時候加上如下代碼
原文鏈接:https://blog.csdn.net/qq_33692349/java/article/details/91490480
this.page= “新的頁碼” this.getData();//獲取數據 this.pageshow = false;//讓分頁隱藏 this.$nextTick(() => {//重新渲染分頁 this.pageshow = true;
})