fix: 点击类别同时展开文件夹并过滤数据
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user