From b8e670978c1e12510d04c4c00b25b35c6ee4d756 Mon Sep 17 00:00:00 2001 From: hubian <908234780@qq.com> Date: Sun, 26 Apr 2026 11:16:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E7=82=B9=E5=87=BB=E4=BA=8B=E4=BB=B6=E5=86=92?= =?UTF-8?q?=E6=B3=A1=E5=AF=BC=E8=87=B4=E9=9D=A2=E6=9D=BF=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- www/app.js | 5 +++-- www/index.html | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/www/app.js b/www/app.js index b48fff3..92943ad 100644 --- a/www/app.js +++ b/www/app.js @@ -231,7 +231,8 @@ function openConversation(id) { const fileInput = document.getElementById('fileInput'); if (attachBtn) { - attachBtn.addEventListener('click', () => { + attachBtn.addEventListener('click', (e) => { + e.stopPropagation(); // 阻止冒泡到 document attachPanel.classList.toggle('show'); }); } @@ -239,7 +240,7 @@ function openConversation(id) { // 点击其他地方关闭面板 document.addEventListener('click', (e) => { if (attachPanel && attachPanel.classList.contains('show') && - !attachPanel.contains(e.target) && e.target !== attachBtn) { + !attachPanel.contains(e.target) && !attachBtn.contains(e.target)) { attachPanel.classList.remove('show'); } }); diff --git a/www/index.html b/www/index.html index 7df9df2..b313289 100644 --- a/www/index.html +++ b/www/index.html @@ -8,12 +8,12 @@ AI助手 - +
- - + + \ No newline at end of file