소스 검색

submit bug fix

zhangjie 5 년 전
부모
커밋
10d715d82f
2개의 변경된 파일15개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/components/UploadButton.vue
  2. 13 0
      src/modules/card/views/CardDesign.vue

+ 2 - 2
src/components/UploadButton.vue

@@ -135,7 +135,7 @@ export default {
         success: false,
         message: content
       };
-      this.$emit("upload-error", content);
+      this.$emit("upload-error", this.res);
     },
     handleExceededSize() {
       const content =
@@ -144,7 +144,7 @@ export default {
         success: false,
         message: content
       };
-      this.$emit("upload-error", content);
+      this.$emit("upload-error", this.res);
     }
   }
 };

+ 13 - 0
src/modules/card/views/CardDesign.vue

@@ -547,6 +547,19 @@ export default {
     },
     toSubmit() {
       if (this.isSubmit) return;
+
+      if (!this.cardConfig.cardName) {
+        this.$message.error("题卡标题不能为空!");
+        this.setCurPageNo(0);
+        setTimeout(() => {
+          document.getElementById("cardNameInput").focus();
+        });
+        return false;
+      }
+      if (this.checkElementCovered()) {
+        this.$message.error("题卡中存在被遮挡的元件,请注意调整!");
+        return false;
+      }
       this.$confirm("确定要提交当前题卡吗?", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",