Files
workspace/code/link56/link56-frontend/src/store/index.ts
T
2025-12-11 17:31:05 +08:00

10 lines
284 B
TypeScript

import type { App } from "vue";
import { createPinia } from "pinia";
import { createPersistedState } from "pinia-plugin-persistedstate"; // 数据持久化
export function setupPinia(app: App) {
const store = createPinia();
store.use(createPersistedState());
app.use(store);
}