From c196aaca03e8234cb6d64e8a3e6325313e41ebec Mon Sep 17 00:00:00 2001 From: Wenjie Zhang Date: Sat, 13 Dec 2025 15:59:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=96=87=E4=BB=B6=E6=95=B0=E9=87=8F?= =?UTF-8?q?=E5=8F=98=E5=8C=96=E6=97=B6=E4=BB=85=E9=87=8D=E6=96=B0=E7=94=9F?= =?UTF-8?q?=E6=88=90=E9=97=AE=E9=A2=98=EF=BC=88=E5=A6=82=E6=9E=9C=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E4=BA=86=EF=BC=89=EF=BC=8C=E4=B8=8D=E5=86=8D=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E7=94=9F=E6=88=90=E6=80=9D=E7=BB=B4=E5=AF=BC=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/views/DataBaseInfoView.vue | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/web/src/views/DataBaseInfoView.vue b/web/src/views/DataBaseInfoView.vue index aa957983..c8427d7c 100644 --- a/web/src/views/DataBaseInfoView.vue +++ b/web/src/views/DataBaseInfoView.vue @@ -242,30 +242,10 @@ watch( return; } - // 如果文件数量发生变化(增加或减少),都重新生成问题和思维导图 + // 如果文件数量发生变化(增加或减少),只重新生成问题,不自动生成思维导图 if (newFileCount !== oldFileCount) { const changeType = newFileCount > oldFileCount ? '增加' : '减少'; - console.log(`文件数量从 ${oldFileCount} ${changeType}到 ${newFileCount},准备重新生成问题和思维导图`); - - // 只要有文件,就重新生成思维导图(无论增加还是减少) - if (newFileCount > 0) { - setTimeout(() => { - if (mindmapSectionRef.value) { - if (oldFileCount === 0) { - // 首次添加文件,生成思维导图 - console.log('首次添加文件,生成思维导图'); - mindmapSectionRef.value.generateMindmap(); - } else { - // 文件数量变化(增加或减少),重新生成思维导图 - console.log(`文件数量变化,重新生成思维导图`); - mindmapSectionRef.value.refreshMindmap(); - } - } - }, 2000); // 等待2秒让后端处理完成 - } else { - // 如果文件数量变为0,清空思维导图(如果需要的话) - console.log('文件数量为0,思维导图将自动清空'); - } + console.log(`文件数量从 ${oldFileCount} ${changeType}到 ${newFileCount},准备重新生成问题`); // 只要有文件,就重新生成问题(无论之前是否有问题) if (newFileCount > 0) {