fix:将分页缓存放入created里 以及pagination取值取pageObj的值
This commit is contained in:
@@ -509,6 +509,13 @@
|
||||
beforeDestroy(){
|
||||
bus.$off("dc-list-change");
|
||||
},
|
||||
created(){
|
||||
//是否存在分页缓存
|
||||
let pageSize = localStorage.getItem('nz-pageSize-' + localStorage.getItem('nz-username') + '-' + this.tableId);
|
||||
if (pageSize != 'undefined' && pageSize != null) {
|
||||
this.pageObj.pageSize = pageSize
|
||||
}
|
||||
},
|
||||
destroyed() {
|
||||
window.onresize = null;
|
||||
},
|
||||
@@ -518,11 +525,6 @@
|
||||
? JSON.parse(localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-" + this.$route.path))
|
||||
: this.tableTitle;
|
||||
this.tableTitleReset(this.tableTitle,this.tools.customTableTitle);
|
||||
//是否存在分页缓存
|
||||
let pageSize = localStorage.getItem('nz-pageSize-' + localStorage.getItem('nz-username') + '-' + this.tableId);
|
||||
if (pageSize != 'undefined' && pageSize != null) {
|
||||
this.pageObj.pageSize = pageSize;
|
||||
}
|
||||
this.getTableData();
|
||||
this.$nextTick(function(){
|
||||
this.getUserData();//绑定滚动条事件,控制top按钮
|
||||
|
||||
Reference in New Issue
Block a user