补充前端事件代理说明注释

This commit is contained in:
2026-04-25 10:04:30 +08:00
parent 308e5690fe
commit d012b3e73b
3 changed files with 8 additions and 0 deletions
+2
View File
@@ -10,6 +10,7 @@ let vipControlEventsBound = false;
* @returns {void}
*/
function callVipGlobal(functionName, ...args) {
// VIP 业务函数暂留在 Blade 内,当前模块只统一按钮事件与旧函数调用边界。
if (typeof window[functionName] === "function") {
window[functionName](...args);
}
@@ -31,6 +32,7 @@ export function bindVipControls() {
return;
}
// VIP 内容由接口动态渲染,tab 和购买按钮通过 data-* 代理避免重复绑定。
const tabButton = event.target.closest("[data-vip-tab]");
if (tabButton) {
event.preventDefault();