1 Commits
Author SHA1 Message Date
hz4th_coder 5169d368bf fix: v1.4.2
1. 填了模型路径后红色线框变橙色(已更改标记)
   - setParam时实时更新线框样式,保留焦点不重建DOM
2. 二进制程序区域宽度缩小一半,运行模式区域扩大
2026-07-20 00:30:21 +08:00
3 changed files with 17 additions and 2 deletions
+2
View File
@@ -209,6 +209,8 @@ header h1 {
.top-controls { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.control-group { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 200px; }
.control-group.control-group-small { flex: 0.5; min-width: 140px; }
.control-group.control-group-large { flex: 2; min-width: 300px; }
.control-group label { font-size: 0.85em; color: var(--text-dim); font-weight: 500; }
+2 -2
View File
@@ -36,14 +36,14 @@
<label>llama.cpp 版本</label>
<select id="version-select" onchange="onVersionChange()"></select>
</div>
<div class="control-group">
<div class="control-group control-group-large">
<label>运行模式</label>
<div class="mode-switch">
<button class="mode-btn active" data-mode="gpu" onclick="switchMode('gpu')">🎮 GPU 模式</button>
<button class="mode-btn" data-mode="gpu_cpu" onclick="switchMode('gpu_cpu')">🎮+💻 GPU+CPU 模式</button>
</div>
</div>
<div class="control-group">
<div class="control-group control-group-small">
<label>二进制程序</label>
<select id="binary-select">
<option value="llama-server">llama-server</option>
+13
View File
@@ -287,6 +287,19 @@ function isParamModified(p, val) {
function setParam(key, value) {
state.paramValues[key] = value;
// Update this item's visual state without full re-render (preserves focus)
const item = document.querySelector(`.param-item[data-key="${key}"]`);
if (item) {
const p = state.params.find(p => p.param_key === key);
if (p) {
item.classList.remove('param-empty', 'param-changed');
if (p.param_key === 'model' && (!value || String(value).trim() === '')) {
item.classList.add('param-empty');
} else if (isParamModified(p, value)) {
item.classList.add('param-changed');
}
}
}
// If on 'modified' tab, re-render to update the list
if (state.currentTab === 'modified') renderParams();
generateCommand(); updateEstimate();