From 09304d872d13c3e40f3112b1eb06b4b6483aa791 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=A5=E6=B5=B7?= Date: Sun, 7 Apr 2024 10:23:58 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9F=A5=E8=AF=A2=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E9=98=B2=E6=8A=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webview/src/apps/wcferry/dbquery.html | 2 +- webview/src/apps/wcferry/dbquery.ts | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/webview/src/apps/wcferry/dbquery.html b/webview/src/apps/wcferry/dbquery.html index 7efdf53..5252066 100644 --- a/webview/src/apps/wcferry/dbquery.html +++ b/webview/src/apps/wcferry/dbquery.html @@ -27,7 +27,7 @@
- +
diff --git a/webview/src/apps/wcferry/dbquery.ts b/webview/src/apps/wcferry/dbquery.ts index e0d23e1..6592d36 100644 --- a/webview/src/apps/wcferry/dbquery.ts +++ b/webview/src/apps/wcferry/dbquery.ts @@ -17,6 +17,8 @@ export class WcferryDbqueryComponent { public sql = 'SELECT * FROM {TABLE} LIMIT 10'; public result = ''; + public loading = false; + constructor() { this.getDbList(); } @@ -36,10 +38,13 @@ export class WcferryDbqueryComponent { } public getDbTableRecords() { + this.loading = true; const db = this.dbName; const sql = this.sql.replace(/\{TABLE\}/, this.tableName); return WrestApi.dbQuerySql({ db, sql }).then((data) => { this.result = JSON.stringify(data, null, 4); + }).finally(() => { + this.loading = false; }); }