Przeglądaj źródła

解决对话课文生词后面的标点符号也被标注高亮

natasha 1 miesiąc temu
rodzic
commit
82417b478b

+ 4 - 2
src/views/book/courseware/preview/components/dialogue_article/PhraseModelChs.vue

@@ -236,7 +236,8 @@
                                       ? attrib.font_size.replace('pt', '') * 1.4 + 'pt'
                                       : '28px',
                                   color:
-                                    newWordList.indexOf(pItem.chs) > -1 || pItem.words
+                                    newWordList.indexOf(item.wordsList[pIndex + 1].chs) > -1 ||
+                                    item.wordsList[pIndex + 1].words
                                       ? attrib
                                         ? attrib.topic_color
                                         : item.wordsList[pIndex + 1].config.color
@@ -337,7 +338,8 @@
                                       ? attrib.font_size.replace('pt', '') * 1.4 + 'pt'
                                       : '28px',
                                   color:
-                                    newWordList.indexOf(pItem.chs) > -1 || pItem.words
+                                    newWordList.indexOf(item.wordsList[pIndex + 2].chs) > -1 ||
+                                    item.wordsList[pIndex + 2].words
                                       ? attrib
                                         ? attrib.topic_color
                                         : item.wordsList[pIndex + 2].config.color