mirror of
https://gitee.com/ulthon/ulthon_information.git
synced 2026-07-01 16:22:49 +08:00
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:
@@ -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 {
|
||||||
|
|||||||
@@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user