Browse Source

fix: 搜索正文显示逻辑调整

Signed-off-by: tangshizhe <48740614+tangshizhe@users.noreply.github.com>
tangshizhe 1 year ago
parent
commit
3b93d78f46
1 changed files with 2 additions and 1 deletions
  1. 2 1
      apps/mobile/src/ui/project-cell/index.vue

+ 2 - 1
apps/mobile/src/ui/project-cell/index.vue

@@ -311,7 +311,8 @@ export default {
       // 正则匹配标签置为空
       const detail = this.detail.replace(/<[^>]+>/g, '')
       const detailLower = detail.toLowerCase()
-      let postion = detailLower.indexOf(this.keys[0])
+      const keyLower = this.keys[0].toLowerCase()
+      let postion = detailLower.indexOf(keyLower)
       if (postion !== -1) {
         if (postion - 10 > 0) {
           return detail.substring(postion - 10)