YangYuGang
2025-04-14 6a7257f9d8f659c508cf826726126c0fa4363eef
src/store/index.ts
@@ -1,10 +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 };