dusenyao 1 gadu atpakaļ
vecāks
revīzija
2a56a94a77

+ 3 - 0
src/views/book/courseware/create/components/CreateCanvas.vue

@@ -161,6 +161,7 @@ export default {
     enterCanvas: {
       handler(val) {
         if (val) return;
+        if (!this.isEdit) return;
         const dragLineList = document.querySelectorAll('.drag-line');
         dragLineList.forEach((item) => {
           item.style.opacity = 0;
@@ -602,6 +603,8 @@ export default {
       this.drag.clientX = clientX;
       this.drag.clientY = clientY;
 
+      if (!this.isEdit) return;
+
       let { isInsideCanvas } = this.getMarginDifferences();
 
       this.enterCanvas = isInsideCanvas;

+ 1 - 0
src/views/book/create.vue

@@ -17,6 +17,7 @@
           <el-upload
             class="cover-uploader"
             action="none"
+            accept=".jpg,.png"
             :show-file-list="false"
             :http-request="uploadCover"
             :before-upload="beforeCoverUpload"