|
@@ -19,11 +19,9 @@
|
|
|
<span>总分</span>
|
|
|
</div>
|
|
|
<div class="board-header-score">
|
|
|
- <transition-group name="score-number-animation" tag="span">
|
|
|
- <span :key="store.currentTask.markResult?.markerScore || 0">{{
|
|
|
- store.currentTask.markResult?.markerScore
|
|
|
- }}</span>
|
|
|
- </transition-group>
|
|
|
+ <span :key="store.currentTask.markResult?.markerScore || 0">{{
|
|
|
+ store.currentTask.markResult?.markerScore
|
|
|
+ }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<qm-button
|
|
@@ -93,15 +91,11 @@
|
|
|
</div>
|
|
|
<!-- 设置高度 避免动画跳动 -->
|
|
|
<div class="question-score">
|
|
|
- <transition-group name="score-number-animation" tag="span">
|
|
|
- <span
|
|
|
- :key="store.currentTask?.markResult?.scoreList[index] || 0"
|
|
|
- >
|
|
|
- <!-- 特殊的空格符号 -->
|
|
|
- <!-- eslint-disable-next-line no-irregular-whitespace -->
|
|
|
- {{ store.currentTask?.markResult?.scoreList[index] ?? " " }}
|
|
|
- </span>
|
|
|
- </transition-group>
|
|
|
+ <span :key="store.currentTask?.markResult?.scoreList[index] || 0">
|
|
|
+ <!-- 特殊的空格符号 -->
|
|
|
+ <!-- eslint-disable-next-line no-irregular-whitespace -->
|
|
|
+ {{ store.currentTask?.markResult?.scoreList[index] ?? " " }}
|
|
|
+ </span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -169,7 +163,7 @@
|
|
|
<script setup lang="ts">
|
|
|
import type { Question } from "@/types";
|
|
|
import { isNumber } from "lodash-es";
|
|
|
-import { onMounted, onUnmounted, watch, ref, reactive } from "vue";
|
|
|
+import { onMounted, onUnmounted, watch, ref, reactive, nextTick } from "vue";
|
|
|
import { store } from "@/store/store";
|
|
|
import { autoChooseFirstQuestion } from "./use/autoChooseFirstQuestion";
|
|
|
import { dragSplitPane } from "./use/splitPane";
|
|
@@ -242,14 +236,14 @@ EventBus.on("draw-change", (list: any) => {
|
|
|
sliceImagesWithTrackListCopy.value = cloneDeep(list);
|
|
|
});
|
|
|
|
|
|
-let questionScoreSteps = $ref<number[]>([]);
|
|
|
// 切换题目是清空上一题的分数
|
|
|
watch(
|
|
|
() => store.currentQuestion,
|
|
|
- () => {
|
|
|
+ (val) => {
|
|
|
store.currentScore = undefined;
|
|
|
- questionScoreSteps = getQuestionScoreSteps();
|
|
|
- if (!props.isCheckAnswer) chooseScore(questionScoreSteps[1]);
|
|
|
+ nextTick(() => {
|
|
|
+ if (!props.isCheckAnswer) chooseScore(questionScoreSteps[1]);
|
|
|
+ });
|
|
|
}
|
|
|
);
|
|
|
|
|
@@ -279,7 +273,7 @@ const questionScore = $computed(
|
|
|
store.currentTask.markResult?.scoreList[store.currentQuestion.__index]
|
|
|
);
|
|
|
|
|
|
-function getQuestionScoreSteps() {
|
|
|
+const questionScoreSteps = $computed(() => {
|
|
|
const question = store.currentQuestion;
|
|
|
if (!question) return [];
|
|
|
|
|
@@ -306,7 +300,7 @@ function getQuestionScoreSteps() {
|
|
|
}
|
|
|
|
|
|
return steps;
|
|
|
-}
|
|
|
+});
|
|
|
|
|
|
function isCurrentQuestion(question: Question) {
|
|
|
return (
|