From 78807937bd7a5ff649ef3d2ae8b0194cd158a1ac Mon Sep 17 00:00:00 2001 From: Yule Date: Thu, 10 Sep 2026 10:19:43 +0800 Subject: [PATCH] =?UTF-8?q?fix(webui):=20=E6=97=A5=E5=BF=97=20code=20?= =?UTF-8?q?=E5=85=83=E7=B4=A0=E7=BB=A7=E6=89=BF=20pre=20=E7=9A=84=E7=AD=89?= =?UTF-8?q?=E5=AE=BD=E6=A0=88=EF=BC=8C=E4=B8=AD=E6=96=87=E4=B8=8D=E5=86=8D?= =?UTF-8?q?=E5=9B=9E=E8=90=BD=E5=88=B0=E5=AE=8B=E4=BD=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 浏览器 UA 样式表对 code 单独设置 font-family: monospace(不继承父级), 导致日志正文的中文仍走通用 monospace 兜底;改为显式 inherit --- webui/src/views/LogView.vue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/webui/src/views/LogView.vue b/webui/src/views/LogView.vue index e194473..f5c746e 100644 --- a/webui/src/views/LogView.vue +++ b/webui/src/views/LogView.vue @@ -94,6 +94,13 @@ const levelClass = (level) => `log-line--${(level || 'plain').toLowerCase()}` line-height: 1.55; } +/* UA 样式表给 code 单独设了 font-family: monospace(不继承 pre), + 必须显式 inherit,否则中文回落到宋体 */ +.log-output code { + font-family: inherit; + font-size: inherit; +} + .log-line { display: block; white-space: pre-wrap;