浏览代码

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

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

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

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