<script >
export default {
data() {
return {
total: 100,
pageSize: 5,
pageNo: 1,
}
},

created() {
this.pageNo = Number(localStorage.getItem('pagination')) || 1;
this.pageChange(this.pageNo);
},

beforeUpdate() {
localStorage.setItem('pagination', this.pageNo);
},

beforeDestroy() {
localStorage.setItem('pagination', '1');
},

methods: {
pageChange(pageNo) {
this.loading = true;
this.pageNo = pageNo;
}
}

}

</script>

相关文章:

  • 2021-12-05
  • 2021-12-05
  • 2021-12-05
  • 2021-12-20
  • 2021-08-15
  • 2021-08-30
猜你喜欢
  • 2022-12-23
  • 2021-11-11
  • 2021-12-05
  • 2021-12-23
  • 2022-12-23
  • 2021-12-05
相关资源
相似解决方案