app page
Created () {
// read page load status information in sessionStorage
IF (sessionStorage.getItem ( "Store" )) {
the this . $ store.replaceState (
Object.assign (
{},
the this . $ store.state,
the JSON.parse (sessionStorage.getItem ( "Store" ))
)
);
}
// a page refresh to save the information in the vuex sessionStorage in
window.addEventListener ( "beforeunload", () => {
sessionStorage.setItem ( " Store "," " );
sessionStorage.setItem ( " Store ", JSON.stringify ( the this $ store.state.));
});
}