Forráskód Böngészése

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

Signed-off-by: tangshizhe <48740614+tangshizhe@users.noreply.github.com>
tangshizhe 1 éve
szülő
commit
d4a8d73ddd
1 módosított fájl, 2 hozzáadás és 1 törlés
  1. 2 1
      apps/mobile/src/ui/project-cell/index.vue

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

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