Parcourir la source

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

Michael Wang il y a 4 ans
Parent
commit
22fde7926a

+ 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);
     }