mirror of
https://gitee.com/spark-store-project/spark-store
synced 2026-08-06 14:23:57 +08:00
style: 统一代码格式与字符串引号风格
1. 替换单引号为双引号统一字符串格式 2. 拆分过长的函数调用与条件判断行提升可读性 3. 简化多行console.log调用为单行格式 4. 为侧边栏添加条目计数标签展示功能
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user