潘志宝
2024-09-20 60ced2e1fb137f5f7216e1a9719c9931fdfd6c7c
1
2
3
4
5
6
7
8
9
10
11
12
import type { App } from 'vue'
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
 
const store = createPinia()
store.use(piniaPluginPersistedstate)
 
export const setupStore = (app: App<Element>) => {
  app.use(store)
}
 
export { store }