export default { name: 'Panel', vueSocket: { onopen() {}, onmessage(msg) { console.log(msg) }, } }
可以实现类似效果吗?https://github.com/MetinSeylan/Vue-Socket.io#-component-level-usage
需求是什么?socket.io 自动调用?那你放在 methods 里一样的。
methods
1.4m articles
1.4m replys
5 comments
56.8k users