From dab97c25e1a401b4b28a7bc35b0ac1d3f7463db7 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 10 Dec 2025 17:28:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0openModal=E8=B0=83=E8=AF=95?= =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 为了诊断弹窗不显示的问题,在openModal函数中添加: 1. 检查元素是否存在 2. 打印元素信息 3. 打印classList 位置: templates/index.html 第1697-1712行 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- templates/index.html | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/templates/index.html b/templates/index.html index 206daab..d041c7f 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1694,8 +1694,22 @@ } // ==================== 通用函数 ==================== - function openModal(id) { document.getElementById(id).classList.add('active'); } - function closeModal(id) { document.getElementById(id).classList.remove('active'); } + function openModal(id) { + const element = document.getElementById(id); + console.log('[openModal] 打开弹窗:', id, '元素:', element); + if (element) { + element.classList.add('active'); + console.log('[openModal] 已添加active类, classList:', element.classList); + } else { + console.error('[openModal] 未找到元素:', id); + } + } + function closeModal(id) { + const element = document.getElementById(id); + if (element) { + element.classList.remove('active'); + } + } function showToast(message, type) { type = type || 'info';