element-ui分頁組件修改當前頁current-page后current-change事件不觸發


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






 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM