const createClient = XMPP.createClient({
jid: "u1@example.com",
password: "1",
transport: "websocket",
wsURL: "ws://example.com/xmpp-websocket"
});
Vue.prototype.$createClient = createClient;
export default {
name: "App",
created: function() {
console.log(this.$createClient)
}
};
</script>
export default {
data() {
return {
client: {},
}
},
mounted() {
var client = XMPP.createClient({
jid: "u1@example.com",
password: "1",
transport: "websocket",
wsURL: "ws://example.com/xmpp-websocket"
});
this.client = client
}
};