From 154df8b5ccb2bd7c345fec8db04e8869e3dc4a49 Mon Sep 17 00:00:00 2001 From: ZhaoLei Date: Sat, 16 Nov 2024 10:54:04 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=A1=B5=E9=9D=A2=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Tool/webtool/src/App.vue | 20 ++++++++++++++++---- Tool/webtool/src/connect.js | 2 +- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/Tool/webtool/src/App.vue b/Tool/webtool/src/App.vue index b057daa..333226a 100644 --- a/Tool/webtool/src/App.vue +++ b/Tool/webtool/src/App.vue @@ -96,7 +96,7 @@ function getOpEmoj(Op) { case 2: return "❌"; default: - return "🚀"; + return "📁"; } } function publishCB(MsgIt) { @@ -105,14 +105,26 @@ function publishCB(MsgIt) { Msgs.value[Msgs.value.length - 1] = MsgIt } else if (MsgIt.Type == 3) { var it = JSON.parse(MsgIt.Body); - it.Children.forEach((e) => { + /** + * This function appears to be intended for processing children elements, though the current implementation is incomplete. + * + * @param {Array} children - The array of child elements to be processed. + * @returns {void} + */ + const f = (item) => { Msgs.value.push({ Step: MsgIt.Step, Type: MsgIt.Type, - Body: `[${getOpEmoj(e.NextOp)}] ${e.FormatedPath}` + Body: `[${getOpEmoj(item.NextOp)}] ${item.FormatedPath}` }) + if (item.Children) { + item.Children.forEach((e) => { + f(e) + }); - }); + } + } + f(it) } else { Msgs.value.push(MsgIt) diff --git a/Tool/webtool/src/connect.js b/Tool/webtool/src/connect.js index a61d682..9dc7359 100644 --- a/Tool/webtool/src/connect.js +++ b/Tool/webtool/src/connect.js @@ -7,7 +7,7 @@ class ConnectPipe { } OpenPipe(config, MsgCb) { var webSocUrl = `ws://${window.location.host}/websoc?Name=${config.Name}` - // var webSocUrl = "ws://127.0.0.1:6818/websoc?Name=Test"; + // var webSocUrl = `ws://127.0.0.1:6818/websoc?Name=${config.Name}`; this.#websocket = new WebSocket(webSocUrl); this.#websocket.onopen = (event) => { var starter = {