2 次代碼提交 45e2870016 ... 4bdcf00f7f

作者 SHA1 備註 提交日期
  zq 4bdcf00f7f Merge branch 'master' of http://gcls-git.helxsoft.cn/GCLS/eep_page 3 天之前
  zq 6fd14fe956 富文本部分换行问题 3 天之前
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. 6 1
      src/components/PinyinText.vue

+ 6 - 1
src/components/PinyinText.vue

@@ -335,7 +335,12 @@ export default {
         } else if (item.text && typeof item.text === 'string' && item.text.includes('<audio')) {
           blocks.push(this.parseAudioBlock(item, tagStack));
         } else if (item.is_style === 'true' || item.is_style === true) {
-          this.handleStyleTag(item, tagStack);
+          if (item.text.includes('<br')) {
+            blocks.push({ type: 'newline' });
+            paragraphIndex += 1;
+          } else {
+            this.handleStyleTag(item, tagStack);
+          }
         } else if (item.text === '\n') {
           blocks.push({ type: 'newline' });
           paragraphIndex += 1;