style: 统一代码格式与字符串引号风格

1.  替换单引号为双引号统一字符串格式
2.  拆分过长的函数调用与条件判断行提升可读性
3.  简化多行console.log调用为单行格式
4.  为侧边栏添加条目计数标签展示功能
This commit is contained in:
2026-07-14 13:59:55 +08:00
parent 750e1d89e4
commit 7420466d92
7 changed files with 100 additions and 56 deletions
+2 -1
View File
@@ -80,7 +80,8 @@ const handleSearchFocus = () => {
const handleInput = () => {
const value = localSearchQuery.value.trim();
// 检测 SPK 分享链接: spk://store/{category}/{pkgname}
const spkMatch = value.match(/^spk:\/\/search\/(.+)$/i) ||
const spkMatch =
value.match(/^spk:\/\/search\/(.+)$/i) ||
value.match(/^spk:\/\/store\/[^/]+\/(.+)$/i);
if (spkMatch) {
const pkgname = spkMatch[1].trim();