瀏覽代碼

【新增】增加软件包 ID 搜索功能并优化搜索逻辑

- 在搜索功能中添加了对软件包 ID 的搜索支持
- 优化了搜索逻辑,提高了搜索的准确性和范围
PJ568 1 年之前
父節點
當前提交
232f81f422
共有 1 個文件被更改,包括 3 次插入 和 1 次删除
  1. 3 1
      index.html

+ 3 - 1
index.html

@@ -293,7 +293,9 @@
             (pkg) =>
               pkg.name.toLowerCase().includes(query) ||
               pkg.author.toLowerCase().includes(query) ||
-              (pkg.description && pkg.description.toLowerCase().includes(query))
+              (pkg.description &&
+                pkg.description.toLowerCase().includes(query)) ||
+              pkg.id.toLowerCase().includes(query)
           );
           renderApps(filtered);
         });