fix(phone-image): 修复字号倍数影响编辑器+刷新后丢失

- CSS变量 --pi-font-scale 仅在渲染容器上设置,不再全局污染
- Slider松手后立即保存配置,确保fontScale持久化
This commit is contained in:
augushong
2026-05-15 20:44:16 +08:00
parent 5a81385448
commit 6fc164fe90
2 changed files with 20 additions and 2 deletions

View File

@@ -80,7 +80,10 @@ var PhoneImageEngine = (function () {
*/
function applyFontScale() {
var scale = config.fontScale || 1;
document.documentElement.style.setProperty('--pi-font-scale', scale);
var preview = document.getElementById('render-preview');
if (preview) preview.style.setProperty('--pi-font-scale', scale);
var staging = document.getElementById('render-staging');
if (staging) staging.style.setProperty('--pi-font-scale', scale);
}
/**