zhangjie 2 năm trước cách đây
mục cha
commit
38df5756e4

+ 6 - 0
src/modules/paper-export/assets/styles/paper-temp-preview.scss

@@ -112,6 +112,12 @@
 .elem-rich-text {
   display: inline-block;
   white-space: pre-wrap;
+
+  img {
+    max-width: 100%;
+    max-height: 100%;
+    height: auto !important;
+  }
 }
 // elem-paper-struct
 .elem-paper-struct {

+ 5 - 0
src/modules/paper-export/assets/styles/temp.css

@@ -85,6 +85,11 @@
   display: inline-block;
   white-space: pre-wrap;
 }
+.elem-rich-text img {
+  max-width: 100%;
+  max-height: 100%;
+  height: auto !important;
+}
 .elem-paper-struct ol {
   padding-left: 20px;
 }

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
src/modules/paper-export/previewTemp.js


+ 8 - 2
src/modules/paper-export/views/PaperTemplateBuild.vue

@@ -633,6 +633,7 @@ export default {
         groups.push(curGroup);
         curGroup = [];
       }
+      // console.log(groups);
 
       const getNextGroup = () => {
         return groups.shift();
@@ -649,7 +650,7 @@ export default {
         }
 
         let curGroupHeigth =
-          groups.length === 1
+          curGroup.length === 1
             ? curGroup[0].h
             : Math.max.apply(
                 null,
@@ -657,12 +658,17 @@ export default {
               );
 
         if (curGroupHeigth + curColumnHeight > this.maxColumnHeight) {
+          // 当前栏第一个元素就超过最大高度时,直接放当前栏
+          if (!curColumn.texts.length) {
+            curColumn.texts.push(...curGroup);
+            curGroup = getNextGroup();
+          }
           // 当前栏满了
           if (curColumnNo >= curPage.columnNumber) {
             // 当前页满了
             pages.push(curPage);
             curPage = null;
-            curColumnNo = null;
+            curColumnNo = 0;
           }
           curColumn = null;
           curColumnHeight = 0;

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác