19 lines
359 B
JavaScript
19 lines
359 B
JavaScript
import { defineStore } from "pinia";
|
|
|
|
export const localStore = defineStore("localStore", {
|
|
state: () => ({
|
|
localStore: {},
|
|
}),
|
|
getters: {
|
|
getLocalStoreInfo: (state) => state.localStore,
|
|
},
|
|
actions: {
|
|
setLocalStoreInfo(localStore) {
|
|
this.localStore = localStore;
|
|
},
|
|
},
|
|
persist: {
|
|
storage: window.localStorage,
|
|
},
|
|
});
|