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