You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a VueUse issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
Check that this is a concrete bug. For Q&A open a GitHub Discussion.
Describe the bug
使用的版本为: "@vueuse/core": "^10.9.0"
这是一段运行的代码
`
const state = reactive({
server: 'ws://124.222.224.186:8800',
retryTimeout: 3000,
sendValue: '',
recordList: [],
});
const { status, data, send, close, open } = useWebSocket(state.server, {
heartbeat: {
message: 'ping',
interval: state.retryTimeout
},
autoReconnect: true,
});
watchEffect(() => {
if (data.value) {
state.recordList.push(data.value);
console.log(state.recordList)
}
//会一直开启,关闭,重启
console.log(status.value)
});
如果这个ws无法连接请自行换个可以用的wss
`
由于Reproduction内无法使用ws链接,请自行更换wss链接即可复现
Reproduction
https://stackblitz.com/edit/vitejs-vite-ytf48z?file=package.json,src%2FApp.vue
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: