fix:将分页缓存放入created里 以及pagination取值取pageObj的值

This commit is contained in:
zhangyu
2020-11-21 12:21:27 +08:00
parent d25eb264e7
commit dd5f2dfe6d
17 changed files with 105 additions and 47 deletions

View File

@@ -767,6 +767,11 @@
},
created(){
this.currentProject=this.$store.state.currentProject;
//是否存在分页缓存
let pageSize=localStorage.getItem('nz-pageSize-'+localStorage.getItem('nz-username')+'-'+this.tableId);
if(pageSize){
this.endpointPageObj.pageSize=pageSize
}
this.getModuleList();
this.getUserData();
this.getProjectList();
@@ -776,11 +781,6 @@
this.tools.customTableTitle=localStorage.getItem("nz-tableTitle-"+localStorage.getItem("nz-username")+"-"+this.$route.path)
?JSON.parse(localStorage.getItem("nz-tableTitle-"+localStorage.getItem("nz-username")+"-"+this.$route.path))
:this.tableTitle;
//是否存在分页缓存
let pageSize=localStorage.getItem('nz-pageSize-'+localStorage.getItem('nz-username')+'-'+this.tableId);
if(pageSize){
this.endpointPageObj.pageSize=pageSize
}
setTimeout(()=>{
this.ready=true;
},300);