Commit e21114c0 by YunaiV

【代码优化】websocket 连接示例,增加 autoReconnect = true 重连

parent cfb3e4a5
......@@ -86,7 +86,7 @@ const getTagColor = computed(() => (getIsOpen.value ? 'success' : 'red')) // Web
/** 发起 WebSocket 连接 */
const { status, data, send, close, open } = useWebSocket(server.value, {
autoReconnect: false,
autoReconnect: true,
heartbeat: true
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment