diff --git a/src/assets/js/toolbox-data.js b/src/assets/js/toolbox-data.js
index 3d04f54..872ea1c 100644
--- a/src/assets/js/toolbox-data.js
+++ b/src/assets/js/toolbox-data.js
@@ -177,18 +177,18 @@ export const toolList = [
{
id: 'network-tools',
title: '网络',
- enabled: false,
+ enabled: true,
items: [
{
id: 'websocket-test-tool',
component: 'Network/WebSocketTestTool',
- title: 'WebSocket',
+ title: 'WebSocket 测试',
iconClass: 'mdi mdi-connection',
- desc: 'WebSocket 测试工具',
- createdAt: '',
- updatedAt: '',
- version: '0',
- enabled: false,
+ desc: '连接 WebSocket 服务端,发送和接收消息。',
+ createdAt: '2024-12-01',
+ updatedAt: '2024-12-01',
+ version: '1',
+ enabled: true,
},
],
},
diff --git a/src/views/ToolboxView/Network/WebSocketTestTool.vue b/src/views/ToolboxView/Network/WebSocketTestTool.vue
index 714cdbc..92af870 100644
--- a/src/views/ToolboxView/Network/WebSocketTestTool.vue
+++ b/src/views/ToolboxView/Network/WebSocketTestTool.vue
@@ -1,9 +1,550 @@
-
+
+
+
+
+ 由于浏览器限制,通过 HTTPS 访问网站时只能连接带 SSL 的 WebSocket(WSS)。
+ 若需要连接不带 SSL 的 WebSocket(WS),建议下载到本地后使用。
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 连接
+ 断开
+ 发送
+ 清空输入
+ 清空消息
+
+
+
+
+
+
+
+
+
+
{{ getCommonDateTime(item.time) }}
+
+
+
{{ item.message }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+