wf0 / socket.io Goto Github PK
View Code? Open in Web Editor NEWvue-socket.io实现即时聊天
vue-socket.io实现即时聊天
我在尝试复现此程序时候,操作步骤是这样的。
"vue-socket.io": "^3.0.10",
Vue.use(Vant,
new VueSocketIO({
debug: false, // debug调试,生产建议关闭
connection: "http://localhost:9999",
vuex: {
store,
actionPrefix: 'SOCKET_',
mutationPrefix: 'SOCKET_'
},
options: { //Optional options,
autoConnect: false, // 自动连接 这里为我项目需求 需要在指定情况下才连接socket
path: "/ws",
transports: ['websocket']
}
})
)
this.$socket.emit("hell","hello")
希望得到你的帮助.....thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.