index.ts 290 B

12345678910111213
  1. import type { App } from 'vue'
  2. import { createPinia } from 'pinia'
  3. import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
  4. const store = createPinia()
  5. store.use(piniaPluginPersistedstate)
  6. export const setupStore = (app: App<Element>) => {
  7. app.use(store)
  8. }
  9. export { store }