Ben Lin
2024-11-25 6e6fec028ffc9a27b3c8d30eb484cd361a119d76
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 };