feat: pinia中使用pinia-plugin-persistedstate实现持久化存储
parent
347f59895a
commit
8655e74cb3
File diff suppressed because it is too large
Load Diff
@ -1,9 +1,12 @@
|
||||
import type { App } from "vue";
|
||||
import { createPinia } from "pinia";
|
||||
import type { App } from 'vue';
|
||||
import { createPinia } from 'pinia';
|
||||
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate';
|
||||
|
||||
const store = createPinia();
|
||||
store.use(piniaPluginPersistedstate);
|
||||
|
||||
export function setupStore(app: App<Element>) {
|
||||
app.use(store);
|
||||
app.use(store);
|
||||
}
|
||||
|
||||
export { store };
|
||||
|
||||
Loading…
Reference in New Issue