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






 

Copyright © 2024 凡凡0410
Powered by .NET 9.0 on Kubernetes