2024-05-11 14:48:02 +08:00
|
|
|
import { createPinia } from "pinia";
|
2024-05-27 16:59:21 +08:00
|
|
|
import piniaPluginPersistedstate from "pinia-plugin-persistedstate";
|
|
|
|
import type { App } from "vue";
|
|
|
|
|
2024-05-11 14:48:02 +08:00
|
|
|
const store = createPinia();
|
|
|
|
|
|
|
|
export function setupStore(app: App<Element>) {
|
2024-05-27 16:59:21 +08:00
|
|
|
store.use(piniaPluginPersistedstate);
|
2024-05-11 14:48:02 +08:00
|
|
|
app.use(store);
|
|
|
|
}
|
|
|
|
|
|
|
|
export { store };
|