修复切换页签时会清空搜索框的问题

This commit is contained in:
2026-03-15 14:47:48 +08:00
parent 6e725e25c8
commit 7e1f85c058
2 changed files with 0 additions and 8 deletions

View File

@@ -342,7 +342,6 @@ const toggleTheme = () => {
const selectCategory = (category: string) => { const selectCategory = (category: string) => {
activeCategory.value = category; activeCategory.value = category;
searchQuery.value = "";
isSidebarOpen.value = false; isSidebarOpen.value = false;
if ( if (
category === "home" && category === "home" &&

View File

@@ -78,11 +78,4 @@ watch(
localSearchQuery.value = newVal || ""; localSearchQuery.value = newVal || "";
}, },
); );
watch(
() => props.activeCategory,
() => {
localSearchQuery.value = "";
},
);
</script> </script>