Use 100-point difference color thresholds

This commit is contained in:
Kiro
2026-10-07 17:06:52 +08:00
parent 23d41d0896
commit d5d4f9fc4f
+10 -2
View File
@@ -241,7 +241,7 @@
<button id="nextPage" type="button">下一页</button>
</nav>
</section>
<p class="footnote"><strong>差额规则:</strong>T-1 − T-2 大于 100 显示绿色;小于 100 显示红色;等于 100 显示琥珀色。页面数据由 AgentStage 每日 10:45(Asia/Shanghai)自动更新。</p>
<p class="footnote"><strong>差额规则:</strong>T-1 − T-2 和 T-1 − T-4:≥ +100 显示绿色;≤ −100 显示红色;其余差额显示黑色。页面数据由 AgentStage 每日 10:45(Asia/Shanghai)自动更新。</p>
</main>
<script>
@@ -429,7 +429,15 @@
cell.textContent = '—';
} else {
cell.textContent = `${value > 0 ? '+' : ''}${money(value)}`;
cell.className = `diff ${value > 100 ? 'positive' : value < 100 ? 'negative' : 'neutral'}`;
if (value >= 100) {
cell.className = 'diff positive';
} else if (value <= -100) {
cell.className = 'diff negative';
} else {
cell.className = 'diff';
cell.style.color = '#000';
cell.style.background = 'transparent';
}
}
return cell;
}