YangYuGang
2025-03-07 406543f8e30d0fb8f2905add5377d043a9c87113
src/store/index.ts
@@ -1,12 +1,16 @@
import type { App } from 'vue';
import { createPinia } from 'pinia';
import { registerPiniaPersistPlugin } from '@/store/plugin/persist';
import { useWebSocketStore } from '/@/store/modules/websocket';
const store = createPinia();
registerPiniaPersistPlugin(store);
export function setupStore(app: App<Element>) {
  app.use(store);
  const webSocketStore = useWebSocketStore();
  webSocketStore.connectWebSocket();
}
export { store };