|
@@ -179,7 +179,7 @@
|
|
|
<script setup lang="ts">
|
|
|
import type { Question } from "@/types";
|
|
|
import { isNumber } from "lodash";
|
|
|
-import { onMounted, onUnmounted } from "vue";
|
|
|
+import { onMounted, onUnmounted, watch } from "vue";
|
|
|
import { store } from "@/store/store";
|
|
|
import { autoChooseFirstQuestion } from "./use/autoChooseFirstQuestion";
|
|
|
import { dragSplitPane } from "./use/splitPane";
|
|
@@ -190,6 +190,12 @@ const { dragSpliter, topPercent } = dragSplitPane();
|
|
|
|
|
|
const { chooseQuestion } = autoChooseFirstQuestion();
|
|
|
|
|
|
+// 切换题目是清空上一题的分数
|
|
|
+watch(
|
|
|
+ () => store.currentQuestion,
|
|
|
+ () => (store.currentScore = undefined)
|
|
|
+);
|
|
|
+
|
|
|
let questionScore = $computed(
|
|
|
() =>
|
|
|
store.currentTask &&
|