You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

12 lines
299 B

import { createApp } from 'vue'
import App from './App.vue'
import router from './router/index.js'
const app = createApp(App)
// 初始化 WebSocket 并挂载到 Vue 实例
const ws = new WebSocket('ws://139.224.164.94:8081')
app.config.globalProperties.$ws = ws
app.use(router)
app.mount('#app')