mirror of
https://gitee.com/spark-store-project/spark-store
synced 2026-04-26 01:10:16 +08:00
修复切换页签时会清空搜索框的问题
This commit is contained in:
@@ -342,7 +342,6 @@ const toggleTheme = () => {
|
||||
|
||||
const selectCategory = (category: string) => {
|
||||
activeCategory.value = category;
|
||||
searchQuery.value = "";
|
||||
isSidebarOpen.value = false;
|
||||
if (
|
||||
category === "home" &&
|
||||
|
||||
@@ -78,11 +78,4 @@ watch(
|
||||
localSearchQuery.value = newVal || "";
|
||||
},
|
||||
);
|
||||
|
||||
watch(
|
||||
() => props.activeCategory,
|
||||
() => {
|
||||
localSearchQuery.value = "";
|
||||
},
|
||||
);
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user