fix path bug

pull/14/head^2
fanyongdong daben 8 years ago
parent a172f0219a
commit d0b01ad2ba

8662
dist/build.js vendored

File diff suppressed because one or more lines are too long

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 {
install(Vue, connection){
install(Vue, ...connection){
if(!connection) throw new Error("[Vue-Socket.io] cannot locate connection")

@ -4,11 +4,10 @@ import Socket from 'socket.io-client'
export default class{
constructor(connection) {
if(typeof connection == 'string'){
this.Socket = Socket(connection);
if (connection.length == 1) {
this.Socket = Socket(connection[0]);
} else {
this.Socket = connection
this.Socket = Socket(connection[0], connection[1]);
}
this.onEvent()

Loading…
Cancel
Save