Ver Fonte

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

Signed-off-by: tangshizhe <48740614+tangshizhe@users.noreply.github.com>
tangshizhe há 1 ano atrás
pai
commit
3b93d78f46
1 ficheiros alterados com 2 adições e 1 exclusões
  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)