Skip to content
This repository was archived by the owner on Oct 2, 2020. It is now read-only.

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

Open
RockYuan opened this issue Dec 29, 2018 · 0 comments
Open

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

RockYuan opened this issue Dec 29, 2018 · 0 comments

Comments

@RockYuan
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant