分页缓存

master
yujialong 3 years ago
parent 2c64f6eccb
commit d814e20384
  1. 9
      src/views/Home.vue

@ -95,7 +95,7 @@ export default {
searchTimer: null, searchTimer: null,
tableData: [], tableData: [],
dataTotal: 0, // () dataTotal: 0, // ()
pageNum: 1, pageNum: +this.$route.query.page || 1,
pageSize: 10, pageSize: 10,
currentPage: 1, currentPage: 1,
systemId: this.$route.query.systemId, systemId: this.$route.query.systemId,
@ -131,6 +131,13 @@ export default {
}, },
handleCurrentChange(val) { // handleCurrentChange(val) { //
this.pageNum = val; this.pageNum = val;
this.$router.redirect({
path: '/',
query: {
...this.$route.query,
page: val
}
})
this.initData(); this.initData();
}, },
initData() { // initData() { //

Loading…
Cancel
Save