fix(webui): 修正等宽字体栈导致中文显示为宋体

- Geist Mono 无中日韩字形,通用 monospace 兜底在 Windows 上是宋体:
  等宽栈补上 Microsoft YaHei / PingFang SC / Noto Sans CJK 兜底
- 状态值的「非休眠/休眠中」等中英混排文本改用页面字体 + 等宽数字(.tabular)
This commit is contained in:
YuleBest committed 2026-09-10 10:14:47 +08:00
1 parent a7bb624eec
commit bb20b56b48
3 files changed
+10 -2

No files matched your search

+5
View File
@@ -132,6 +132,11 @@ body::-webkit-scrollbar,
font-variant-numeric: tabular-nums;
}
/* 中英混排的数值:用页面字体 + 等宽数字,避免中文落到等宽栈的 CJK 兜底字体 */
.tabular {
font-variant-numeric: tabular-nums;
}
/* ── 表面:MD3 用色调层级而非阴影表达层级 ─────────────────────────── */
.section {
background-color: var(--md-sys-color-surface-container-low);
+4 -1
View File
@@ -66,7 +66,10 @@
--md-sys-typescale-label-small-tracking: 0.0313em;
--md-sys-typescale-font: 'Geist', system-ui, -apple-system, sans-serif;
--md-sys-typescale-font-mono: 'Geist Mono', ui-monospace, monospace;
/* 等宽栈要带上 CJK 无衬线兜底:Geist Mono 无中文字形,直接落到通用 monospace
会在 Windows 上显示为宋体 */
--md-sys-typescale-font-mono:
'Geist Mono', ui-monospace, 'Microsoft YaHei', 'PingFang SC', 'Noto Sans CJK SC', monospace;
/* @material/web 组件内部的字体族取自 ref typeface(默认回退 Roboto),
必须显式指向项目字体,否则组件内文字与页面字体不一致 */
+1 -1
View File
@@ -83,7 +83,7 @@ async function confirmLow() {
<component :is="item.icon" :size="14" aria-hidden="true" />
{{ item.label }}
</span>
<span class="status-item__value mono">{{ item.value }}</span>
<span class="status-item__value tabular">{{ item.value }}</span>
</div>
</div>