diff --git a/resources/js/chat-room/marriage-status.js b/resources/js/chat-room/marriage-status.js index dbe321b..79a1251 100644 --- a/resources/js/chat-room/marriage-status.js +++ b/resources/js/chat-room/marriage-status.js @@ -10,6 +10,7 @@ let marriageStatusEventsBound = false; * @returns {void} */ function callMarriageGlobal(functionName, ...args) { + // 婚姻状态业务仍在 Blade 内维护,当前模块只负责按钮事件和旧函数桥接。 if (typeof window[functionName] === "function") { window[functionName](...args); } @@ -43,6 +44,7 @@ export function bindMarriageStatusControls() { return; } + // 弹窗 tab 与分页内容由存量脚本渲染,事件统一通过 data-* 分发。 const tabButton = event.target.closest("[data-marriage-tab]"); if (tabButton) { event.preventDefault(); @@ -82,6 +84,7 @@ export function bindMarriageStatusControls() { const action = actionButton.getAttribute("data-marriage-action") || ""; callMarriageGlobal("marriageAction", marriageId, action); + // 部分操作按钮声明完成后立即关闭弹窗,这是按钮级行为约定。 if (actionButton.getAttribute("data-marriage-close-after-action") === "1") { callMarriageGlobal("closeMarriageStatusModal"); }