From 656188a4865fe38c5cba734d9a987057c78542b9 Mon Sep 17 00:00:00 2001 From: Orion Date: Thu, 9 Jul 2026 17:09:36 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=E4=BF=AE=E5=A4=8D=E7=94=9F?= =?UTF-8?q?=E5=91=BD=E5=91=A8=E6=9C=9F=E6=94=B6=E8=B5=B7=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E5=93=8D=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/patch_admin_timeline_ui.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/patch_admin_timeline_ui.py b/scripts/patch_admin_timeline_ui.py index 7e65a91..eb32154 100644 --- a/scripts/patch_admin_timeline_ui.py +++ b/scripts/patch_admin_timeline_ui.py @@ -75,7 +75,9 @@ def write_detail_collapse_script(theme_dir: Path) -> bool: btn.type = 'button'; btn.className = 'fcbx-life-toggle mt-3 rounded-lg border px-3 py-2 text-sm font-medium transition'; btn.style.cssText = 'border-color:rgba(148,163,184,.55);display:inline-flex;align-items:center;gap:.35rem;'; - btn.addEventListener('click', () => { + btn.addEventListener('click', event => { + event.preventDefault(); + event.stopPropagation(); section.dataset.fcbxLifecycleCollapsed = section.dataset.fcbxLifecycleCollapsed === '1' ? '0' : '1'; apply(section); }); @@ -116,9 +118,8 @@ def main() -> None: theme = ASSETS_ROOT / 'themes/2026' assets = theme / 'assets' if assets.exists(): - for path in assets.glob('FileManageView-*.js'): - if patch_file_manage(path): - changed.append(str(path.relative_to(ASSETS_ROOT))) + # 只用独立 DOM 脚本处理生命周期收起,避免再改编译后的 FileManageView, + # 否则 Vue 内部状态和外部补丁会互相抢状态,导致展开/收起需要点多次。 for path in assets.glob('clipboard-*.js'): if patch_clipboard(path): changed.append(str(path.relative_to(ASSETS_ROOT)))