fix: errors
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user