zhangjie 1 年之前
父節點
當前提交
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() {
 async function getNextStudent() {
-  if (isLast) return;
+  if (isLast) {
+    void message.warning("已经是最后一份!");
+    return;
+  }
   student = await getStudent(studentIds[currentIndex + 1]);
   student = await getStudent(studentIds[currentIndex + 1]);
 }
 }
 
 
 async function getPreviousStudent() {
 async function getPreviousStudent() {
-  if (isFirst) return;
+  if (isFirst) {
+    void message.warning("已经是第一份!");
+    return;
+  }
   student = await getStudent(studentIds[currentIndex - 1]);
   student = await getStudent(studentIds[currentIndex - 1]);
 }
 }
 
 

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

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