From 0ae1472e79c52bae650a693e67c5cf59d5f2bbe4 Mon Sep 17 00:00:00 2001 From: nanhaoluo <3075912108@qq.com> Date: Thu, 22 Jan 2026 15:57:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=BC=80=E5=90=AF?= =?UTF-8?q?=E8=BF=9B=E5=85=A5=E6=96=87=E7=AB=A0=E5=8A=A8=E7=94=BB=E6=97=B6?= =?UTF-8?q?=E6=96=87=E7=AB=A0=E5=8A=A0=E8=BD=BD=E4=B8=8D=E6=AD=A3=E5=B8=B8?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 pjax:beforeReplace 事件中清理文章列表的 PJAX 加载状态 - 移除 post-preview 元素的 loading 动画和 transform 样式 - 清理 post-list-pjax-loading 类,避免影响新页面 - 优化 post-full 动画,添加 transform-origin 确保动画流畅 - 通过 :not(.no-animation) 选择器支持禁用动画的场景 --- argontheme.js | 10 ++++++++++ style.css | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/argontheme.js b/argontheme.js index dd03d45..d771482 100644 --- a/argontheme.js +++ b/argontheme.js @@ -2775,6 +2775,16 @@ $(document).pjax("a[href]:not([no-pjax]):not(.no-pjax):not([target='_blank']):no // 清理旧页面的资源 cleanupPjaxResources(); + // 清理文章列表的 PJAX 加载状态 + $(".post-preview.post-pjax-loading").removeClass("post-pjax-loading").css({ + "transform": "", + "transition": "", + "left": "", + "width": "" + }); + $(".post-preview .loading-css-animation").remove(); + $("#main").removeClass("post-list-pjax-loading"); + // 更新 UI 状态 if ($("#post_comment", dom[0]).length > 0){ $("#fabtn_go_to_comment").removeClass("d-none"); diff --git a/style.css b/style.css index 87ba0ea..54a4731 100644 --- a/style.css +++ b/style.css @@ -16308,7 +16308,8 @@ article.post.card .post-thumbnail { #primary.pjax-loading { opacity: 0.6; transform: translateY(10px); pointer-events: none; } #primary { transition: opacity var(--animation-normal) var(--ease-standard), transform var(--animation-normal) var(--ease-standard); } @keyframes modernContentFadeIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } } -article.post.post-full { animation: modernContentFadeIn var(--animation-slow) var(--ease-emphasized-decelerate); } +article.post.post-full:not(.no-animation) { animation: modernContentFadeIn var(--animation-slow) var(--ease-emphasized-decelerate); } +article.post.post-full { transform-origin: center top; } #float_action_buttons { transition: transform var(--animation-normal) var(--ease-back), opacity var(--animation-normal) var(--ease-standard); } #float_action_buttons .fabtn { transition: background var(--animation-fast) var(--ease-standard), box-shadow var(--animation-fast) var(--ease-standard), opacity var(--animation-normal) var(--ease-standard); }