diff --git a/src/store/index.ts b/src/store/index.ts index d5e3770..d09a35c 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -1,4 +1,4 @@ -import { createPinia } from 'pinia' +import { createPinia, setActivePinia } from 'pinia' import { createPersistedState } from 'pinia-plugin-persistedstate' // 数据持久化 const store = createPinia() @@ -10,6 +10,7 @@ store.use( }, }), ) +setActivePinia(store) export default store