Browse Source

feat: 支持附件匹配词高亮

zhangyuhan 1 year ago
parent
commit
8153f00efd
1 changed files with 4 additions and 1 deletions
  1. 4 1
      apps/bigmember_pc/src/components/article-item/ArticleItem.vue

+ 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) {