Try to move perstisting to stores

This commit is contained in:
jacob1123 committed 2022-02-10 16:30:42 +00:00
1 parent 21dcd7837b
commit 0e342f2bcf
3 files changed
+20 -21

No files matched your search

+6 -1
View File
@@ -48,6 +48,11 @@ export const useSessionStore = defineStore('session', {
},
logout() {
this.$reset()
},
restoreFromLocalStorage() {
const json = localStorage.getItem("session");
const value = JSON.parse(json || "{}");
Object.assign(this, value);
}
}
})
})