mirror of
https://github.com/MetinSeylan/Vue-Socket.io.git
synced 2025-04-16 15:21:28 +02:00
Merge 9b18ff5a05
into c7491fc762
This commit is contained in:
commit
9d5bee246c
4 changed files with 8666 additions and 11 deletions
8662
dist/build.js
vendored
8662
dist/build.js
vendored
File diff suppressed because one or more lines are too long
2
dist/build.js.map
vendored
2
dist/build.js.map
vendored
File diff suppressed because one or more lines are too long
|
@ -3,7 +3,7 @@ import Emitter from './Emitter'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
install(Vue, connection){
|
install(Vue, ...connection){
|
||||||
|
|
||||||
if(!connection) throw new Error("[Vue-Socket.io] cannot locate connection")
|
if(!connection) throw new Error("[Vue-Socket.io] cannot locate connection")
|
||||||
|
|
||||||
|
@ -37,4 +37,4 @@ export default {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,11 +4,10 @@ import Socket from 'socket.io-client'
|
||||||
export default class{
|
export default class{
|
||||||
|
|
||||||
constructor(connection) {
|
constructor(connection) {
|
||||||
|
if (connection.length == 1) {
|
||||||
if(typeof connection == 'string'){
|
this.Socket = Socket(connection[0]);
|
||||||
this.Socket = Socket(connection);
|
} else {
|
||||||
}else{
|
this.Socket = Socket(connection[0], connection[1]);
|
||||||
this.Socket = connection
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.onEvent()
|
this.onEvent()
|
||||||
|
|
Loading…
Add table
Reference in a new issue