From 489e95d67739c9ed5a4a3db4340c8e101b5c43c8 Mon Sep 17 00:00:00 2001 From: hubian <908234780@qq.com> Date: Wed, 22 Apr 2026 12:02:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E5=88=87=E6=8D=A2=E6=8C=89=E9=92=AE=E6=97=A0?= =?UTF-8?q?=E6=95=88=E9=97=AE=E9=A2=98=EF=BC=88=E6=B7=BB=E5=8A=A0currentIt?= =?UTF-8?q?ems=E5=8F=98=E9=87=8F=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xian_favor/api.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xian_favor/api.py b/xian_favor/api.py index 23861b3..362af27 100644 --- a/xian_favor/api.py +++ b/xian_favor/api.py @@ -1814,6 +1814,7 @@ INDEX_TEMPLATE = ''' const API_BASE = '/api'; let currentFilter = { type: '', status: '', starred: null, folder_id: null }; let currentSort = { sort_by: '', sort_order: '' }; +let currentItems = []; // 保存当前显示的数据,用于切换显示模式时重新渲染 let currentPage = 1; const pageSize = 20; let allFolders = {}; // 按类型存储文件夹 @@ -2032,6 +2033,7 @@ async function loadItems(page = 1) { const data = await res.json(); if (data.success) { + currentItems = data.data; // 保存数据用于切换显示模式 renderItems(data.data); renderPagination(data.total, page); // 使用API返回的total }