我重构了这个插件,让它可以在vue3上工作,欢迎各位感兴趣的开发者使用。
likaia opened this issue · 6 comments
likaia commented
loong917 commented
reconnection: true可以实现真正的重连吗?
likaia commented
亲测可以
loong917 commented
@likaia 作者的项目vue-native-websocket重连未生效,有遇到这种情况么?
Vue.use(VueNativeSock, 'ws://localhost:9090', {
reconnection: true, // (Boolean) whether to reconnect automatically (false)
reconnectionAttempts: 5, // (Number) number of reconnection attempts before giving up (Infinity),
reconnectionDelay: 3000, // (Number) how long to initially wait before attempting a new (1000)
})
client连接上server后,重启server , client 没有reconnect , 哪里没有配置好么?
likaia commented
你需要在vuex配置对应的函数,你可以看看我的开源项目的使用方法
loong917 commented
你需要在vuex配置对应的函数,你可以看看我的开源项目的使用方法
可以了,谢谢你。这个项目使用vuex是必须的,不是可选配置项?
likaia commented
对,他这个必须配上vuex