@
simonmao 谢谢支持, 站点数据用数组存储, 在内存中遍历非常快的。核心代码
```typescript
// 搜索站点,保留 section 结构
const filteredSites: { [sectionId: string]: NavigationItemType[] } = {};
pages.forEach((page, pageIndex) => {
page.forEach(section => {
const matchedSites = section.items.filter(site =>
site.title.toLowerCase().includes(query) || site.url?.toLowerCase().includes(query)
);
if (matchedSites.length > 0) {
filteredSites[
section.id] = matchedSites;
}
});
});
```