fix(phone-image): T7 integration fixes

Fix 3 bugs found during Playwright integration testing:

1. Template syntax: {|json_encode|default='{}'} -> PHP native (curly braces parsed as TP6 tags)

2. jQuery event namespace mismatch: off('click.phoneImage') -> off('click') to match on('click')

3. Migration executed on server

All 6 Playwright test scenarios passed: layout, content flow, preview, alignment, font size, toolbar buttons
This commit is contained in:
augushong
2026-05-02 09:54:59 +08:00
parent 03e9a30242
commit 9dce9854c8
2 changed files with 4 additions and 4 deletions

View File

@@ -60,9 +60,9 @@ var PhoneImageEngine = (function () {
}
// 内容流事件委托(只绑定一次)
$(document).off('click.phoneImage', '.break-inserter-btn');
$(document).off('click.phoneImage', '.remove-break-btn');
$(document).off('click.phoneImage', '.page-alignment-toggle');
$(document).off('click', '.break-inserter-btn');
$(document).off('click', '.remove-break-btn');
$(document).off('click', '.page-alignment-toggle');
$(document).on('click', '.break-inserter-btn', function () {
var afterIndex = parseInt($(this).parent().data('after-index'), 10);

View File

@@ -180,7 +180,7 @@
};
// 恢复之前保存的排版配置
var savedConfig = {$layoutConfig|json_encode|default="{}"};
var savedConfig = <?php echo $layoutConfig ? json_encode($layoutConfig) : '{}'; ?>;
var initConfig = {
size: savedConfig.size || 'xiaohongshu',
fontSize: savedConfig.fontSize || 14,