From e9379709869c6e1dea0a3db515dafe7a31be3a01 Mon Sep 17 00:00:00 2001 From: augushong Date: Tue, 19 May 2026 20:08:17 +0800 Subject: [PATCH] =?UTF-8?q?fix(phone-image):=20=E5=8F=B3=E5=81=B4=E7=95=AB?= =?UTF-8?q?=E5=B8=83=E5=AD=97=E8=99=9F=E4=B8=8D=E7=94=9F=E6=95=88+?= =?UTF-8?q?=E5=AD=97=E8=99=9F=E5=88=B7=E6=96=B0=E4=B8=9F=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. applyFontScale()新增#paginated-preview的CSS變量設置 --pi-font-scale/--pi-table-font-scale/--pi-code-font-scale 2. .page-content新增font-size:calc(14px*var(--pi-font-scale,1)) 之前.page-content無font-size設置,右側DOM分頁無法響應字號調整 3. 字號從後端savedConfig正確恢復(fontScale:1.2驗證通過) --- public/static/css/phone-image-templates.css | 1 + public/static/js/phone-image.js | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/public/static/css/phone-image-templates.css b/public/static/css/phone-image-templates.css index a2590d9..6f8078f 100644 --- a/public/static/css/phone-image-templates.css +++ b/public/static/css/phone-image-templates.css @@ -297,6 +297,7 @@ overflow: hidden; word-break: break-word; line-height: 2.0; + font-size: calc(14px * var(--pi-font-scale, 1)); } .page-content p { diff --git a/public/static/js/phone-image.js b/public/static/js/phone-image.js index eae35fe..a726555 100644 --- a/public/static/js/phone-image.js +++ b/public/static/js/phone-image.js @@ -186,6 +186,12 @@ var PhoneImageEngine = (function () { staging.style.setProperty('--pi-table-font-scale', tableScale); staging.style.setProperty('--pi-code-font-scale', codeScale); } + var paginated = document.getElementById('paginated-preview'); + if (paginated) { + paginated.style.setProperty('--pi-font-scale', scale); + paginated.style.setProperty('--pi-table-font-scale', tableScale); + paginated.style.setProperty('--pi-code-font-scale', codeScale); + } } /**