From 241ca1b67fd3f93ece59b47e4e7c416419c0c21d Mon Sep 17 00:00:00 2001 From: wood Date: Sat, 29 Jul 2023 01:05:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9F=A5=E8=AF=A2=E5=8A=A8?= =?UTF-8?q?=E7=94=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 5356337..35ff0cc 100644 --- a/index.html +++ b/index.html @@ -340,6 +340,19 @@ font-size: 30px; /* 调整为适当的大小 */ } + + button.loading::before { + content: ""; + display: inline-block; + margin-right: .5rem; + border: 2px solid #fff; + border-top-color: transparent; + border-bottom-color: transparent; + border-radius: 50%; + width: .75rem; + height: .75rem; + animation: rotate .5s linear infinite; + } @@ -358,8 +371,7 @@

输入 API KEY

本站不保存 KEY 信息,查询后请自行保存

-

+

@@ -529,6 +541,12 @@ //查询函数 function sendRequest() { + + let button = document.querySelector("button"); + button.textContent = "加载中..."; + button.disabled = true; + button.classList.add("loading") + let apiKeyInput = document.getElementById("api-key-input"); let apiUrlSelect = document.getElementById("api-url-select"); let customUrlInput = document.getElementById("custom-url-input"); @@ -588,6 +606,8 @@ } ) + + let row = document.createElement("tr"); let serialNumberCell = document.createElement("td"); // 创建序列号单元格 @@ -680,6 +700,10 @@ serialNumber++; // 增加序列号 h2.style.display = 'block'; table.style.display = 'table'; + + button.textContent = "查询"; + button.disabled = false; + button.classList.remove("loading") }) }