Prechádzať zdrojové kódy

Merge branch 'master' of http://60.205.254.193:3000/GCLS/eep_page

zq 1 mesiac pred
rodič
commit
ebc62f06f2

+ 15 - 1
src/views/book/courseware/create/components/question/article/CheckWord.vue

@@ -161,6 +161,7 @@ export default {
         if (item.segList && item.segList.length > 0) {
           item.segList.forEach((items, indexs) => {
             items.forEach((itemss, indexss) => {
+              // str += (itemss === ' ' ? '@_@' : itemss) + (indexss !== items.length - 1 ? '  ' : '');
               str += itemss + (indexss !== items.length - 1 ? '  ' : '');
             });
             str += '\n';
@@ -255,7 +256,20 @@ export default {
               let arrs = item.trim().split('  ');
               let saveItem = [];
               arrs.forEach((items, indexs) => {
-                saveItem.push(items);
+                let arrss = items.split(' '); // 为了保留英文单词中的空格
+                if (arrss.length > 1) {
+                  arrss.forEach((itemss) => {
+                    if (itemss === '') {
+                      saveItem.push(' ');
+                    } else {
+                      saveItem.push(itemss);
+                    }
+                  });
+                } else if (items !== '') {
+                  saveItem.push(items);
+                }
+
+                // saveItem.push(items === '@_@' ? ' ' : items);
               });
               saveArr[indexP].push(saveItem);
               indexS++;

+ 8 - 0
src/views/book/courseware/preview/components/article/WordModelChs.vue

@@ -157,6 +157,7 @@
                                   attrib
                                     ? attrib.assist_color
                                     : '',
+                                width: pItem.chs.trim() === '' ? '6px' : '',
                               }"
                               >{{ NumberList.indexOf(pItem.pinyin) == -1 ? convertText(pItem.chs) : ''
                               }}<img
@@ -230,6 +231,7 @@
                                   attrib
                                     ? attrib.assist_color
                                     : '',
+                                width: item.wordsList[pIndex + 1].chs.trim() === '' ? '6px' : '',
                               }"
                               >{{
                                 NumberList.indexOf(item.wordsList[pIndex + 1].pinyin) == -1
@@ -333,6 +335,7 @@
                                   attrib
                                     ? attrib.assist_color
                                     : '',
+                                width: item.wordsList[pIndex + 2].chs.trim() === '' ? '6px' : '',
                               }"
                               >{{
                                 NumberList.indexOf(item.wordsList[pIndex + 2].pinyin) == -1
@@ -420,6 +423,7 @@
                                 attrib
                                   ? attrib.assist_color
                                   : '',
+                              width: pItem.chs.trim() === '' ? '6px' : '',
                             }"
                             @click="showWordDetail($event, pItem)"
                             >{{ NumberList.indexOf(pItem.pinyin) == -1 ? convertText(pItem.chs) : ''
@@ -577,6 +581,7 @@
                                     attrib && attrib.font_size
                                       ? attrib.font_size.replace('pt', '') * 1.4 + 'pt'
                                       : '28px',
+                                  width: pItem.chs.trim() === '' ? '6px' : '',
                                 }"
                                 >{{
                                   NumberList.indexOf(pItem.pinyin) == -1 ? convertText(pItem.chs[wIndex]) : ''
@@ -638,6 +643,7 @@
                                 fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
                                 lineHeight:
                                   attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
+                                width: item.sentArr[pIndex + 1].chs.trim() === '' ? '6px' : '',
                               }"
                             >
                               {{
@@ -709,6 +715,7 @@
                                 fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
                                 lineHeight:
                                   attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
+                                width: item.sentArr[pIndex + 2].chs.trim() === '' ? '6px' : '',
                               }"
                             >
                               {{
@@ -782,6 +789,7 @@
                                 fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
                                 lineHeight:
                                   attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
+                                width: pItem.chs[wIndex].trim() === '' ? '6px' : '',
                               }"
                               >{{ NumberList.indexOf(pItem.pinyin) == -1 ? convertText(pItem.chs[wIndex]) : '' }}</span
                             >