From a1bc42220293bef54d1519d29e3ba966750f5823 Mon Sep 17 00:00:00 2001 From: shijun Wei <191796158@qq.com> Date: Tue, 20 Oct 2020 16:33:25 +0800 Subject: [PATCH] fix vue 3 plugin install --- src/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/index.js b/src/index.js index 465539e..1ae5dcc 100644 --- a/src/index.js +++ b/src/index.js @@ -26,11 +26,11 @@ export default class VueSocketIO { * Vue.js entry point * @param Vue */ - install(Vue){ + install(app){ - Vue.prototype.$socket = this.io; - Vue.prototype.$vueSocketIo = this; - Vue.mixin(Mixin); + app.config.globalProperties.$http = this.io; + app.config.globalProperties.$vueSocketIo = this; + app.mixin(Mixin); Logger.info('Vue-Socket.io plugin enabled');