From 6928c05dddd213ffa2a3c97a8ef44141774065e9 Mon Sep 17 00:00:00 2001 From: yml2213 Date: Thu, 23 Jul 2026 14:10:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=BB=9A=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/main.js | 16 +++++++----- frontend/src/style.css | 58 ++++++++++++++++++++++++++++++++++-------- 2 files changed, 57 insertions(+), 17 deletions(-) diff --git a/frontend/src/main.js b/frontend/src/main.js index 7aea592..dde1a57 100644 --- a/frontend/src/main.js +++ b/frontend/src/main.js @@ -45,15 +45,17 @@ app.innerHTML = ` -
-
账号数据
- -
+
+
+
账号数据
+ +
-
-
结果
-
暂无结果
+      
+
结果
+
暂无结果
 点击“预览 JSON”或“上传”后,这里会显示多行结果。
+
`; diff --git a/frontend/src/style.css b/frontend/src/style.css index 1b7eb8f..cc44bd5 100644 --- a/frontend/src/style.css +++ b/frontend/src/style.css @@ -11,10 +11,16 @@ body { margin: 0; + overflow: hidden; min-height: 100vh; background: #f6f8fc; } +#app { + height: 100vh; + overflow: hidden; +} + button, input, textarea { @@ -23,8 +29,13 @@ textarea { .shell { width: min(1080px, calc(100vw - 40px)); + height: 100vh; margin: 0 auto; - padding: 22px 0 28px; + padding: 22px 0; + display: grid; + grid-template-rows: auto auto auto minmax(0, 1fr); + gap: 14px; + overflow: hidden; } .topbar { @@ -32,7 +43,6 @@ textarea { align-items: flex-start; justify-content: space-between; gap: 20px; - margin-bottom: 14px; } h1 { @@ -69,7 +79,6 @@ p { } .config { - margin-bottom: 14px; border: 1px solid #d7dce5; border-radius: 8px; background: #ffffff; @@ -111,9 +120,8 @@ input { } textarea { - min-height: 330px; padding: 12px; - resize: vertical; + resize: none; line-height: 1.55; } @@ -127,7 +135,6 @@ textarea:focus { display: flex; align-items: center; gap: 10px; - margin-bottom: 14px; } .button { @@ -161,7 +168,10 @@ textarea:focus { } .panel { - margin-bottom: 16px; + min-width: 0; + min-height: 0; + display: flex; + flex-direction: column; } .panel-title { @@ -170,12 +180,35 @@ textarea:focus { color: #374151; } +.workspace { + min-height: 0; + display: grid; + grid-template-columns: minmax(360px, 0.92fr) minmax(420px, 1.08fr); + gap: 16px; +} + +.input-panel, +.result-panel { + height: 100%; +} + +#data, +#result { + flex: 1; + min-height: 0; + overflow: auto; + scrollbar-width: none; +} + +#data::-webkit-scrollbar, +#result::-webkit-scrollbar { + width: 0; + height: 0; +} + #result { - min-height: 390px; - max-height: 44vh; margin: 0; padding: 14px; - overflow: auto; border: 1px solid #cfd6e2; border-radius: 8px; background: #0f172a; @@ -191,6 +224,7 @@ textarea:focus { .shell { width: calc(100vw - 24px); padding-top: 14px; + overflow: auto; } .topbar, @@ -207,4 +241,8 @@ textarea:focus { .config-grid label + label { margin-top: 12px; } + + .workspace { + grid-template-columns: 1fr; + } }