Sfoglia il codice sorgente

fixed 普通模式切换显示分数

Michael Wang 4 anni fa
parent
commit
89079954f7

+ 3 - 2
src/features/mark/MarkBoardKeyBoard.vue

@@ -92,14 +92,15 @@ export default defineComponent({
      *  */
     let scoreStr = ref("");
     watch(
-      () => store.currentQuestion,
+      () => [store.currentQuestion, store.setting.uiSetting["normal.mode"]],
       () => {
         if (isNumber(store.currentQuestion?.score)) {
           scoreStr.value = "" + store.currentQuestion?.score;
         } else {
           scoreStr.value = "";
         }
-      }
+      },
+      { immediate: true }
     );
 
     const questionScoreSteps = computed(() => {

+ 1 - 1
src/features/mark/use/autoChooseFirstQuestion.ts

@@ -11,7 +11,7 @@ export function autoChooseFirstQuestion() {
   watch(
     () => store.currentTask,
     () => {
-      // FIXME: 此时取到的还是score:null,但是 chooseQuestion之后就变成了score:0
+      // FIXed ME: 此时取到的还是score:null,但是 chooseQuestion之后就变成了score:0
       const firstQuestion = store.currentTask?.questionList[0];
       if (firstQuestion) {
         // const oldScore = firstQuestion.score;