fix(dnfs): 切换特效模式时立即生效当前页面特效节点
从"无特效模式"切回"特效模式"时,renderSpJs 的自动执行判断 仅在卡片首次渲染时执行一次,不会重新触发。现在切换后 重新渲染当前层卡片,使特效节点按新状态立即生效或停止。
This commit is contained in:
1 parent
786509f2e2
commit
bcb1d5d557
1 file changed
+3
-2
@@ -1131,8 +1131,9 @@ function renderUserPanel() {
|
||||
sp_effects_disabled = !sp_effects_disabled;
|
||||
try { localStorage.setItem('sp_effects_disabled', sp_effects_disabled ? '1' : '0'); } catch (e) {}
|
||||
effect_btn.textContent = sp_effects_disabled ? "无特效模式" : "特效模式";
|
||||
/* 关闭时移除当前已运行的全部特效沙箱 */
|
||||
if (sp_effects_disabled) clearAllEffects();
|
||||
/* 切换时清除已有特效并按新状态重新渲染当前层卡片 */
|
||||
clearAllEffects();
|
||||
renderCards(current_children);
|
||||
});
|
||||
userpanel.appendChild(effect_btn);
|
||||
|
||||
|
||||
Reference in new issue
Block a user