From 5102923febe4ac05164e6530ef6cf99c2d59aff4 Mon Sep 17 00:00:00 2001 From: imeepos Date: Fri, 18 Jul 2025 13:51:56 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E5=88=B0=E5=89=AA=E6=98=A0=E6=88=90=E5=8A=9F=E5=90=8E=E7=9A=84?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=88=B7=E6=96=B0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 功能改进 ### 1. TemplateMatchingResultManager.tsx - 在V1和V2导出成功后自动刷新匹配结果列表 - 调用loadResults()和loadStatistics()更新数据 - 确保导出记录能及时反映在界面上 ### 2. ExportRecordManager.tsx - 在重新导出成功后刷新导出记录列表 - 添加更详细的成功日志信息 ## 用户体验改进 - 导出成功后无需手动刷新页面 - 数据状态实时更新,保持界面一致性 - 避免使用window.location.reload()的粗暴刷新方式 ## 技术细节 - 使用现有的loadResults()和loadStatistics()方法 - 保持异步操作的错误处理机制 - 在成功提示后立即刷新数据 这样用户在导出到剪映后能立即看到最新的导出记录和状态更新。 --- apps/desktop/src/components/ExportRecordManager.tsx | 4 +++- .../src/components/TemplateMatchingResultManager.tsx | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/apps/desktop/src/components/ExportRecordManager.tsx b/apps/desktop/src/components/ExportRecordManager.tsx index 4ba281b..d58ecd8 100644 --- a/apps/desktop/src/components/ExportRecordManager.tsx +++ b/apps/desktop/src/components/ExportRecordManager.tsx @@ -166,8 +166,10 @@ const ExportRecordManager: React.FC = ({ recordId, newFilePath: selected }); + + // 重新导出成功后刷新导出记录列表 await loadExportRecords(); - console.log('重新导出成功'); + console.log('重新导出成功,已刷新导出记录列表'); } } catch (err) { setError(`重新导出失败: ${err}`); diff --git a/apps/desktop/src/components/TemplateMatchingResultManager.tsx b/apps/desktop/src/components/TemplateMatchingResultManager.tsx index 3d4895a..3f210c4 100644 --- a/apps/desktop/src/components/TemplateMatchingResultManager.tsx +++ b/apps/desktop/src/components/TemplateMatchingResultManager.tsx @@ -221,6 +221,10 @@ export const TemplateMatchingResultManager: React.FC