elementui分页保持当前页
时间: 2023-09-24 17:07:19 浏览: 102
使用element-ui的el-menu导航选中后刷新页面保持当前选中状态
elementUI的分页组件在更新总条数后,不会实时更新当前页。解决这个问题的思路是,实时更新总条数,并根据更新后的总条数和每页显示的条数计算出实时更新的最后一页,然后将当前页与最后一页进行比较。如果当前页大于最后一页,则将当前页跳转到实时更新后的最后一页;否则,保持当前页不变。通过这种方式可以解决elementUI分页保持当前页的问题。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [删除ElementUI分页最后一页最后一条显示bug](https://blog.csdn.net/weixin_50550864/article/details/131055570)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *3* [100行代码实现一个vue分页组功能](https://download.csdn.net/download/weixin_38629362/13659530)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文