mirror of
https://gitee.com/hhyykk/ipms-sjy-ui.git
synced 2025-02-01 19:24:58 +08:00
【代码优化】websocket 连接示例,增加 autoReconnect = true 重连
This commit is contained in:
parent
cfb3e4a5ff
commit
e21114c0b5
@ -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
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user