迁移彩票底部关闭事件

This commit is contained in:
2026-04-25 10:54:28 +08:00
parent 22981802ca
commit 8bf913c568
@@ -370,7 +370,7 @@
onmouseover="this.style.background='#dbeafe'" onmouseout="this.style.background='#f0f6ff'">
🔄 刷新
</button>
<button @click="closeLotteryPanel()"
<button type="button" data-lottery-panel-close
style="padding:9px 18px; border-radius:20px; font-size:12px; font-weight:bold;
background:#f9fafb; color:#6b7280; border:1.5px solid #e5e7eb;
cursor:pointer; transition:all .15s; font-family:inherit;"
@@ -637,8 +637,10 @@
};
// 顶部关闭按钮由脚本集中绑定,避免标题栏继续保留内联 onclick。
document.querySelector('[data-lottery-panel-close]')?.addEventListener('click', function(e) {
e.preventDefault();
closeLotteryPanel();
document.querySelectorAll('[data-lottery-panel-close]').forEach(button => {
button.addEventListener('click', function(e) {
e.preventDefault();
closeLotteryPanel();
});
});
</script>