Browse Source

修复画图进度问题

黎海 2 months ago
parent
commit
083c9ff8d5
2 changed files with 3 additions and 2 deletions
  1. 1 0
      .gitignore
  2. 2 2
      src/pages/projectDetail/projectDetail.js

+ 1 - 0
.gitignore

@@ -9,6 +9,7 @@
9 9
 # 生产构建
10 10
 /build
11 11
 /dist
12
+/release
12 13
 
13 14
 # 杂项
14 15
 .DS_Store

+ 2 - 2
src/pages/projectDetail/projectDetail.js

@@ -912,7 +912,7 @@ const ProjectDetail = () => {
912 912
       ).length;
913 913
       
914 914
       console.log(`当前已完成的图片数量: ${existingCompletedCount}`);
915
-      setCompletedDrawings(existingCompletedCount);
915
+      setCompletedDrawings(0); // 重置已完成计数
916 916
 
917 917
       if (isForceRedraw) {
918 918
         // 重绘:处理所有有描述词的分镜
@@ -982,7 +982,7 @@ const ProjectDetail = () => {
982 982
       // 设置UI状态
983 983
       setGeneratingImages(true);
984 984
       setIsPaused(false);
985
-      setImageGenerationProgress({ current: 0, total: totalSegmentsToProcess });
985
+      setImageGenerationProgress({ current: 0, total: totalSegmentsToProcess }); // 重置进度为0
986 986
 
987 987
       // 保存到localStorage
988 988
       localStorage.setItem(`project_${projectId}_image_generation`, JSON.stringify({