Преглед на файлове

回看时打回,检查是否勾选

Michael Wang преди 4 години
родител
ревизия
22fde7926a
променени са 2 файла, в които са добавени 10 реда и са изтрити 0 реда
  1. 5 0
      src/features/inspect/MarkBoardInspect.vue
  2. 5 0
      src/features/library/inspect/MarkBoardInspect.vue

+ 5 - 0
src/features/inspect/MarkBoardInspect.vue

@@ -85,6 +85,7 @@
 
 <script lang="ts">
 import { Question } from "@/types";
+import { message } from "ant-design-vue";
 import { computed, defineComponent, reactive, watch } from "vue";
 import { store } from "./store";
 
@@ -199,6 +200,10 @@ export default defineComponent({
     }
 
     function reject() {
+      if (checkedQuestions.length === 0) {
+        message.warn({ content: "请先选择试题。" });
+        return;
+      }
       emit("reject", checkedQuestions);
     }
 

+ 5 - 0
src/features/library/inspect/MarkBoardInspect.vue

@@ -85,6 +85,7 @@
 
 <script lang="ts">
 import { Question } from "@/types";
+import { message } from "ant-design-vue";
 import { computed, defineComponent, reactive, watch } from "vue";
 import { store } from "./store";
 
@@ -199,6 +200,10 @@ export default defineComponent({
     }
 
     function reject() {
+      if (checkedQuestions.length === 0) {
+        message.warn({ content: "请先选择试题。" });
+        return;
+      }
       emit("reject", checkedQuestions);
     }