2022-10-08 11:28:50 +08:00
|
|
|
import type { App } from 'vue'
|
2021-12-11 11:46:10 +08:00
|
|
|
import { createPinia } from 'pinia'
|
2023-11-29 21:09:37 +08:00
|
|
|
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
|
2022-09-30 16:52:39 +08:00
|
|
|
|
2021-12-11 11:46:10 +08:00
|
|
|
const store = createPinia()
|
|
|
|
|
2023-11-29 21:09:37 +08:00
|
|
|
store.use(piniaPluginPersistedstate)
|
2023-05-10 10:12:31 +08:00
|
|
|
|
2022-10-08 11:28:50 +08:00
|
|
|
export const setupStore = (app: App<Element>) => {
|
|
|
|
app.use(store)
|
|
|
|
}
|
2021-12-11 11:46:10 +08:00
|
|
|
|
|
|
|
export { store }
|