소스 검색

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

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