state
listPagePars: new Map()
mutations
SAVE_LIST_PAGE_PARS: (state,{ path,pars }) => {
console.log('state vuex ==',pars)
state.listPagePars.set(path,pars);
},
actions
saveListPagePars: ({ commit },{path,pars}) => {
commit('SAVE_LIST_PAGE_PARS',{ path,pars });
},
存
this.$store.dispatch('saveListPagePars',{path:this.$route.path+'_1',pars:aaa});
取
let currentPage1 = this.$store.state.listPagePars.has(this.$route.path+'_1')?this.$store.state.listPagePars.get(this.$route.path+'_1'):1