背景:由于浏览器回退会导致vue页面刷新。尤其是在遇到这种情况时,会引起不好的用户体验:
从可翻页的列表页进入详情页,通过浏览器回退会导致页面刷新,导致翻页page变为第一页。
首先介绍我使用的翻页方法,vue翻页插件:v-infinite-scroll
<div class="bottom_content">
<no-data style="margin-top: 30%;" v-if="isShow"></no-data>
<ul
v-infinite-scroll="loadMore"
infinite-scroll-disabled="loading"
infinite-scroll-distance="10">
<