From bf63610510c1fce8d13d7f3047ccd65cf2e723c6 Mon Sep 17 00:00:00 2001 From: hubian <908234780@qq.com> Date: Wed, 22 Apr 2026 10:52:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=82=B9=E5=87=BB=E7=B1=BB=E5=88=AB?= =?UTF-8?q?=E5=90=8C=E6=97=B6=E5=B1=95=E5=BC=80=E6=96=87=E4=BB=B6=E5=A4=B9?= =?UTF-8?q?=E5=B9=B6=E8=BF=87=E6=BB=A4=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xian_favor/api.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/xian_favor/api.py b/xian_favor/api.py index e34f675..fcfe37d 100644 --- a/xian_favor/api.py +++ b/xian_favor/api.py @@ -3462,11 +3462,21 @@ function renderFolderList(type) { } // 切换文件夹区域展开/折叠 +// 切换文件夹区域展开/折叠,并过滤显示该类别数据 function toggleSection(type) { const section = document.getElementById(`section-${type}`); if (!section) return; + // 切换展开状态 section.classList.toggle('expanded'); + + // 更新侧边栏选中状态 + document.querySelectorAll('.sidebar a').forEach(a => a.classList.remove('active')); + section.querySelector('.section-header').classList.add('active'); + + // 设置过滤条件:只过滤类型,不限制文件夹 + currentFilter = { type, status: '', starred: null, folder_id: null }; + loadItems(1); } async function showNewFolderModal(type) {