From 29dbc760443318f5247817798b71018ce4edef9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=92=E9=85=92=E7=9A=84=E6=9D=8E=E7=99=BD?= <670939375@qq.com> Date: Sun, 24 Aug 2025 15:30:56 +0800 Subject: [PATCH] The console on the right side of the web interface displays a height limit. --- templates/index.html | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/templates/index.html b/templates/index.html index 4f947c7..b8842d3 100644 --- a/templates/index.html +++ b/templates/index.html @@ -85,6 +85,7 @@ flex: 1; display: flex; height: calc(100vh - 140px); + min-height: 0; /* 允许子元素缩小 */ } /* 嵌入页面区域 */ @@ -115,6 +116,7 @@ display: flex; flex-direction: column; background-color: #ffffff; + min-height: 0; /* 允许子元素缩小 */ } /* 应用切换按钮 */ @@ -178,6 +180,8 @@ overflow-y: auto; white-space: pre-wrap; word-break: break-all; + min-height: 0; /* 允许内容缩小 */ + max-height: 100%; /* 限制最大高度 */ } .console-line { @@ -477,12 +481,7 @@ div.textContent = line; consoleOutput.appendChild(div); - // 保持最近100行 - const lines = consoleOutput.children; - if (lines.length > 100) { - consoleOutput.removeChild(lines[0]); - } - + // 自动滚动到底部显示最新内容 consoleOutput.scrollTop = consoleOutput.scrollHeight; }