Przeglądaj źródła

refactor(sixHatPage): 注释掉所有setTestJson触发调用

暂时禁用了页面向父组件提交工作数据的emit调用,避免不必要的同步更新
lsc 16 godzin temu
rodzic
commit
ea1dd94df0

+ 8 - 8
src/components/pages/workPage/components/sixHatPage.vue

@@ -691,7 +691,7 @@ export default {
 
     // 设置阶段保存触发
     setupStep() {
-      if (this.work.stage === 'setup') this.$emit('setTestJson', this.work);
+      // if (this.work.stage === 'setup') this.$emit('setTestJson', this.work);
     },
 
     // 帽子切换 → 重置倒计时
@@ -765,7 +765,7 @@ export default {
             this.currentHatIdx = 0;
 
             // 同步父组件保存,避免下次加载重复 isFresh
-            this.$nextTick(() => this.$emit('setTestJson', merged));
+            // this.$nextTick(() => this.$emit('setTestJson', merged));
           }
 
           this.work = merged;
@@ -799,7 +799,7 @@ export default {
       } else {
         this.startActivity();
       }
-      this.$emit('setTestJson', this.work);
+      // this.$emit('setTestJson', this.work);
     },
 
     // —— 计时设置 ——
@@ -831,7 +831,7 @@ export default {
       this.work.hatContent = content;
       this.work.stage = 'activity';
       this.currentHatIdx = 0;
-      this.$emit('setTestJson', this.work);
+      // this.$emit('setTestJson', this.work);
     },
     backToSetup() {
       this.clearCountdown();
@@ -841,7 +841,7 @@ export default {
         return;
       }
       this.work.stage = 'setup';
-      this.$emit('setTestJson', this.work);
+      // this.$emit('setTestJson', this.work);
     },
     prevHat() {
       if (this.currentHatIdx > 0) this.currentHatIdx--;
@@ -850,7 +850,7 @@ export default {
       if (this.isLastHat) {
         this.work.stage = 'review';
         this.clearCountdown();
-        this.$emit('setTestJson', this.work);
+        //this.$emit('setTestJson', this.work);
       } else {
         this.currentHatIdx++;
       }
@@ -927,7 +927,7 @@ export default {
         this.work.stage = 'activity';
         this.currentHatIdx = 0;
       }
-      this.$emit('setTestJson', this.work);
+      // this.$emit('setTestJson', this.work);
     },
     restart() {
       if (this.$confirm) {
@@ -950,7 +950,7 @@ export default {
       this.work.stage = 'activity';
       this.clearCountdown();
       this.restartCountdown();
-      this.$emit('setTestJson', this.work);
+      //this.$emit('setTestJson', this.work);
     },
 
     // —— 语音输入 ——