fix: Token趋势图柱子不显示 — 柱子容器高度塌缩修复

This commit is contained in:
thzxx
2026-04-23 17:22:41 +08:00
parent aa9bfa01f7
commit 118af9dd9a
2 changed files with 15 additions and 3 deletions
@@ -152,11 +152,13 @@ function renderDashboard(): void {
<span class="td-val-output">${formatTokenCount(r.eval_count)}</span> <span class="td-val-output">${formatTokenCount(r.eval_count)}</span>
<span class="td-val-input">${formatTokenCount(r.prompt_eval_count)}</span> <span class="td-val-input">${formatTokenCount(r.prompt_eval_count)}</span>
</div> </div>
<div class="td-bar-wrapper">
<div class="td-bar" style="height:${heightPct}%;"> <div class="td-bar" style="height:${heightPct}%;">
<div class="td-bar-fill"> <div class="td-bar-fill">
<div class="td-bar-input" style="height:${inputPct}%;"></div> <div class="td-bar-input" style="height:${inputPct}%;"></div>
</div> </div>
</div> </div>
</div>
<div class="td-bar-label">R${r.round}</div> <div class="td-bar-label">R${r.round}</div>
</div> </div>
`; `;
+10
View File
@@ -3579,6 +3579,7 @@ html, body {
display: flex; display: flex;
align-items: flex-end; align-items: flex-end;
gap: 6px; gap: 6px;
height: 180px;
border-left: 1px solid var(--border-subtle); border-left: 1px solid var(--border-subtle);
border-bottom: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle);
padding: 0 8px 0 4px; padding: 0 8px 0 4px;
@@ -3592,6 +3593,7 @@ html, body {
flex: 1; flex: 1;
min-width: 36px; min-width: 36px;
max-width: 60px; max-width: 60px;
height: 100%;
cursor: default; cursor: default;
} }
@@ -3604,6 +3606,7 @@ html, body {
font-size: 9px; font-size: 9px;
font-family: var(--font-mono); font-family: var(--font-mono);
white-space: nowrap; white-space: nowrap;
flex-shrink: 0;
} }
.td-val-output { .td-val-output {
@@ -3614,6 +3617,13 @@ html, body {
color: #9B7ED8; color: #9B7ED8;
} }
.td-bar-wrapper {
flex: 1;
width: 100%;
display: flex;
align-items: flex-end;
}
.td-bar { .td-bar {
width: 100%; width: 100%;
border-radius: 4px 4px 0 0; border-radius: 4px 4px 0 0;