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