소스 검색

feat: 支持附件匹配词高亮

zhangyuhan 1 년 전
부모
커밋
8153f00efd
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  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) {