vue-websocket icon indicating copy to clipboard operation
vue-websocket copied to clipboard

How to set option before connect but not in Vue.use ?

Open RockYuan opened this issue 6 years ago • 0 comments

Look like #7 But we need set option before connect but not in Vue.use

main.js

Vue.use(VueWebsocket, null, { autoConnect: false });

App.vue

created() {
        // Like this?  get the bar before connect
        this.$socket.option = {
               query: 'foo='+bar,
               'transports': ['websocket'],
        }
	this.$socket.open();
}

Thanks

RockYuan avatar Dec 29 '18 06:12 RockYuan