YangYuGang
2025-03-08 8cae1dcd8d2bde01880ac4b70bdda4e61df3c7ef
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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 };