element-ui分页组件修改当前页current-page后current-change事件不触发
Posted on 2020-07-01 17:37 凡凡0410 阅读(5032) 评论(0) 编辑 收藏 举报<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;
})