pinia-plugin-persistedstate を使用して pinia に永続性を提供し、authStore に userId メンバーを追加する
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { store } from 'quasar/wrappers'
|
||||
import { createPinia } from 'pinia'
|
||||
import { Router } from 'vue-router';
|
||||
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
|
||||
|
||||
/*
|
||||
* When adding new properties to stores, you should also
|
||||
@@ -24,6 +25,7 @@ declare module 'pinia' {
|
||||
|
||||
export default store((/* { ssrContext } */) => {
|
||||
const pinia = createPinia()
|
||||
pinia.use(piniaPluginPersistedstate)
|
||||
|
||||
// You can add Pinia plugins here
|
||||
// pinia.use(SomePiniaPlugin)
|
||||
|
||||
Reference in New Issue
Block a user