Преглед на файлове

句子拆分模版有图片情况下计算宽度

natasha преди 1 месец
родител
ревизия
36c4c0da63
променени са 2 файла, в които са добавени 10 реда и са изтрити 2 реда
  1. 5 1
      src/components/Adult/preview/SentenceModule.vue
  2. 5 1
      src/components/Adult/preview/SentenceMulModule.vue

+ 5 - 1
src/components/Adult/preview/SentenceModule.vue

@@ -1223,7 +1223,11 @@ export default {
       if (this.curQue.img_list && this.curQue.img_list.length > 0) {
         contentWidth = 780 - this.curQue.img_size;
       }
-      if (itemLeg == 1) {
+      if (
+        itemLeg == 1 &&
+        this.curQue.img_list &&
+        this.curQue.img_list.length === 0
+      ) {
         this.itemsWidth = 780;
       } else {
         this.itemsWidth = Math.floor(contentWidth / itemLeg) - 16;

+ 5 - 1
src/components/Adult/preview/SentenceMulModule.vue

@@ -1357,7 +1357,11 @@ export default {
       if (this.curQue.img_list && this.curQue.img_list.length > 0) {
         contentWidth = 780 - this.curQue.img_size;
       }
-      if (itemLeg == 1) {
+      if (
+        itemLeg == 1 &&
+        this.curQue.img_list &&
+        this.curQue.img_list.length === 0
+      ) {
         this.itemsWidth = 780;
       } else {
         this.itemsWidth = Math.floor(contentWidth / itemLeg) - 16;