fix: errors

This commit is contained in:
2025-08-06 14:59:39 +08:00
parent c4ad0c1dc9
commit aa20b6d7e6
10 changed files with 188 additions and 23 deletions

View File

@@ -216,9 +216,12 @@ class AppState {
navLinks.forEach(link => {
const title = link.querySelector('.nav-title').textContent.toLowerCase();
const subtitle = link.querySelector('.nav-subtitle').textContent.toLowerCase();
const description = link.querySelector('.nav-description').textContent.toLowerCase();
const matches = title.includes(searchTerm) || description.includes(searchTerm);
const matches = title.includes(searchTerm) ||
subtitle.includes(searchTerm) ||
description.includes(searchTerm);
link.style.display = matches ? 'flex' : 'none';
link.parentElement.style.display = matches ? 'block' : 'none';
@@ -517,7 +520,7 @@ class AppState {
for (const [key, value] of Object.entries(data.data || {})) {
html += `
<div class="detail-item">
<label class="detail-label">${key}</label>
<div class="detail-label">${key}</div>
<div class="detail-value">${value || ''}</div>
</div>
`;
@@ -609,6 +612,7 @@ class AppState {
// 全局函数
window.toggleSidebar = () => app.toggleSidebar();
window.closeSidebar = () => app.closeSidebar();
window.toggleTheme = () => app.toggleTheme();
window.debounceSearch = (query) => app.handleSearchInput(query);
window.performSearch = () => {
const searchInput = document.getElementById('searchInput');