fix(phone-image): 右側畫布字號不生效+字號刷新丟失

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驗證通過)
This commit is contained in:
augushong
2026-05-19 20:08:17 +08:00
parent 234746aa83
commit e937970986
2 changed files with 7 additions and 0 deletions

View File

@@ -297,6 +297,7 @@
overflow: hidden; overflow: hidden;
word-break: break-word; word-break: break-word;
line-height: 2.0; line-height: 2.0;
font-size: calc(14px * var(--pi-font-scale, 1));
} }
.page-content p { .page-content p {

View File

@@ -186,6 +186,12 @@ var PhoneImageEngine = (function () {
staging.style.setProperty('--pi-table-font-scale', tableScale); staging.style.setProperty('--pi-table-font-scale', tableScale);
staging.style.setProperty('--pi-code-font-scale', codeScale); 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);
}
} }
/** /**