From f0f608b398ed84320c1bfd3602c92fa3b2ef741a Mon Sep 17 00:00:00 2001 From: x1ao4 Date: Thu, 28 Aug 2025 23:23:16 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=B5=84=E6=BA=90=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E4=B8=8B=E6=8B=89=E4=B8=8E=E6=96=87=E4=BB=B6=E5=A4=B9?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E6=A8=A1=E6=80=81=E4=BA=A4=E4=BA=92=EF=BC=8C?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=85=B3=E9=97=AD=E6=97=B6=E6=9C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - keep: 打开/关闭选择需转存的文件夹模态不再自动关闭下拉 - add: 点击模态右上角关闭按钮或模态内部区域不关闭下拉 - change: 仅在 “转存当前文件夹/保存到当前文件夹” 确认时,同时关闭模态与下拉 - fix: 在多处初始化分支补充 “点击发生在 #fileSelectModal 内部时不关闭下拉” 的判断 - chore: 在 `selectCurrentFolder()` 中显式关闭下拉,避免确认后下拉残留 --- app/templates/index.html | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/app/templates/index.html b/app/templates/index.html index 7a1b390..55e7c94 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -2675,7 +2675,9 @@ if (e.target.closest('.input-group input') || e.target.closest('.btn-primary[type="button"]') || e.target.closest('.dropdown-menu.task-suggestions') || - e.target.closest('.bi-search')) { + e.target.closest('.bi-search') || + // 新增:点击发生在文件选择模态框内(包括右上角关闭按钮)时,不关闭下拉 + e.target.closest('#fileSelectModal')) { return; } // 只隐藏下拉菜单,不清空搜索结果,这样点击同一任务的输入框时还能看到之前的搜索结果 @@ -4510,8 +4512,6 @@ this.smart_param.showSuggestions = true; }, selectSuggestion(index, suggestion) { - this.smart_param.showSuggestions = false; - // 不直接设置分享链接到输入框,只是打开文件选择模态框让用户浏览 // 用户在模态框中导航后,最终的 this.fileSelect.shareurl 才是需要的地址 @@ -4972,6 +4972,8 @@ } if (!this.fileSelect.moveMode) { $('#fileSelectModal').modal('hide') + // 用户已确认选择,自动关闭搜索结果下拉菜单 + this.smart_param.showSuggestions = false; } }, // 移动文件到当前文件夹 @@ -8669,7 +8671,9 @@ if (e.target.closest('.input-group input') || e.target.closest('.btn-primary[type="button"]') || e.target.closest('.dropdown-menu.task-suggestions') || - e.target.closest('.bi-search')) { + e.target.closest('.bi-search') || + // 点击发生在文件选择模态框内(包括右上角关闭按钮)时,不关闭下拉 + e.target.closest('#fileSelectModal')) { return; } // 只隐藏下拉菜单,不清空搜索结果,这样点击同一任务的输入框时还能看到之前的搜索结果