From 23fcd561092b0fefe2d7447315bffdcfb550aeaf Mon Sep 17 00:00:00 2001 From: nhkefus Date: Thu, 20 Mar 2025 13:36:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BD=91=E9=A1=B5=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E9=85=8D=E7=BD=AE=E5=8A=9F=E8=83=BD=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TC1/http_server/web/index.html | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/TC1/http_server/web/index.html b/TC1/http_server/web/index.html index a536755..25c6da9 100644 --- a/TC1/http_server/web/index.html +++ b/TC1/http_server/web/index.html @@ -892,9 +892,9 @@ for (var i = 0; i < actions.length; i++) { @@ -903,8 +903,7 @@ for (var i = 0; i < actions.length; i++) { `; } document.getElementById("short_click_events_tb").innerHTML = tb_html; -// 刷新 MDL 元素 -componentHandler.upgradeDom(); + }); @@ -1242,9 +1241,9 @@ for (var i = 0; i < actions.length; i++) { @@ -1253,8 +1252,7 @@ for (var i = 0; i < actions.length; i++) { `; } document.getElementById("short_click_events_tb").innerHTML = tb_html; -// 刷新 MDL 元素 -componentHandler.upgradeDom(); + window.setTimeout(GetPowerRecord, 3000); }, power_idx.toString()); @@ -1332,19 +1330,18 @@ componentHandler.upgradeDom(); GetTimedTask(); }, cmd); } -function selectOperation(rowId, index, operations) { +function selectOperation(rowId, index, operationText) { +var witch = parseInt(rowId.split('-')[1]); if (index === -1) { document.getElementById(`${rowId}-input`).value = '未设置'; document.getElementById(`${rowId}-value`).value = -1; } else { -var witch = parseInt(rowId.split('-')[1]); - const selectedText = operations[index]; - document.getElementById(`${rowId}-input`).value = selectedText; + document.getElementById(`${rowId}-input`).value = operationText; document.getElementById(`${rowId}-value`).value = index; } -HttpDel("/shortClickEvent", function (re) { +HttpPost("/shortClickEvent", function (re) { ShowToast("已设置按钮事件"); - }, `${witch} index`); + }, `${witch} ${index}`); } function DelTimedTask(timestamp) {