Procházet zdrojové kódy

feat: 支持附件匹配词高亮

zhangyuhan před 1 rokem
rodič
revize
8153f00efd

+ 4 - 1
apps/bigmember_pc/src/components/article-item/ArticleItem.vue

@@ -414,7 +414,10 @@ export default {
     // 处理关键词在附件中
     calcFileText() {
       const inFile = this.article.filetext_search
-      const keywords = this.getMatchKeys
+      let keywords = this.getMatchKeys
+      if (this.article?.fs_word && this.article?.fs_word[0]) {
+        keywords = this.article?.fs_word
+      }
       if (inFile) {
         const keyword = keywords[0]
         if (keyword?.length > 3) {