Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

我重构了这个插件,让它可以在vue3上工作,欢迎各位感兴趣的开发者使用。 #128

Open
likaia opened this issue Nov 2, 2020 · 6 comments

Comments

@likaia
Copy link

likaia commented Nov 2, 2020

链接如下:vue-native-websocket-vue3

@loong917
Copy link

reconnection: true可以实现真正的重连吗?

@likaia
Copy link
Author

likaia commented Nov 10, 2020

亲测可以

@loong917
Copy link

@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
Copy link
Author

likaia commented Nov 11, 2020

你需要在vuex配置对应的函数,你可以看看我的开源项目的使用方法

@loong917
Copy link

你需要在vuex配置对应的函数,你可以看看我的开源项目的使用方法

可以了,谢谢你。这个项目使用vuex是必须的,不是可选配置项?

@likaia
Copy link
Author

likaia commented Nov 11, 2020

对,他这个必须配上vuex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants