zhangjie 1 год назад
Родитель
Сommit
50a3a4afd6
2 измененных файлов с 16 добавлено и 4 удалено
  1. 8 2
      src/features/check/ObjectiveAnswer.vue
  2. 8 2
      src/features/check/SubjectiveAnswer.vue

+ 8 - 2
src/features/check/ObjectiveAnswer.vue

@@ -243,12 +243,18 @@ function logout() {
 }
 
 async function getNextStudent() {
-  if (isLast) return;
+  if (isLast) {
+    void message.warning("已经是最后一份!");
+    return;
+  }
   student = await getStudent(studentIds[currentIndex + 1]);
 }
 
 async function getPreviousStudent() {
-  if (isFirst) return;
+  if (isFirst) {
+    void message.warning("已经是第一份!");
+    return;
+  }
   student = await getStudent(studentIds[currentIndex - 1]);
 }
 

+ 8 - 2
src/features/check/SubjectiveAnswer.vue

@@ -165,12 +165,18 @@ const logout = () => {
 };
 
 async function getNextStudent() {
-  if (isLast) return;
+  if (isLast) {
+    void message.warning("已经是最后一份!");
+    return;
+  }
   await updateTask(studentIds[currentIndex + 1]);
 }
 
 async function getPreviousStudent() {
-  if (isFirst) return;
+  if (isFirst) {
+    void message.warning("已经是第一份!");
+    return;
+  }
   await updateTask(studentIds[currentIndex - 1]);
 }