修复聊天室滚屏开关失效

This commit is contained in:
pllx
2026-04-30 15:19:38 +08:00
parent 8c7b1086ff
commit b21f583fe5
6 changed files with 70 additions and 10 deletions
+3 -1
View File
@@ -1,5 +1,7 @@
// 婚姻弹窗辅助入口,承接从 marriage-modals.blade.php 迁移出的全局函数。
import { isAutoScrollEnabled, scrollChatToBottom } from "./message-utils.js";
/**
* 向聊天主窗口追加一条婚姻系统公告,允许传入受控 HTML 按钮。
*
@@ -17,7 +19,7 @@ export function appendSystemMessage(html) {
div.style.cssText = "background:linear-gradient(135deg,#fdf4ff,#fce7f3); border-left:3px solid #ec4899; border-radius:6px; padding:5px 12px; margin:3px 0; font-size:13px; line-height:1.6;";
div.innerHTML = `<span style="color:#9d174d;">${html}</span>`;
container.appendChild(div);
container.scrollTop = container.scrollHeight;
scrollChatToBottom(container, isAutoScrollEnabled);
}
/**