Support Vue.js as a Vue plugin
momocow opened this issue · comments
牛牛 commented
Then the SDK can be used to develope a Vue app (or Vue components), with this.$bot
or syntaxes like this.
砂糖梨子 commented
why don't those guys mixin <https://vuejs.org/v2/guide/mixins.html> by
themselves?
momocow <notifications@github.com> 于2018年10月25日周四 上午11:36写道:
… Vue plugin reference <https://vuejs.org/v2/guide/plugins.html>
Then the SDK can be used to develope a Vue app (or Vue components), with
this.$bot or syntaxes like this.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#37>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/ARha8WFvL3X6dGcfMmgrUGiKKCERLXSJks5uoTG6gaJpZM4X5bxL>
.
牛牛 commented
I was inspired by this vue plugin, but its API shows that it can only hold a WebSocket instance across the whole app.
It seems somewhat inconvenience for certain scenarios 🤔
I found that I don't like to make the bot instance singleton after trying the vue-native-websocket API.
So just leave those who wants to integrate with Vue do the mixin themselves.