mirror of
https://gitee.com/spark-store-project/spark-store
synced 2026-04-26 09:20:18 +08:00
修复切换页签时会清空搜索框的问题
This commit is contained in:
@@ -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" &&
|
||||||
|
|||||||
@@ -78,11 +78,4 @@ watch(
|
|||||||
localSearchQuery.value = newVal || "";
|
localSearchQuery.value = newVal || "";
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
watch(
|
|
||||||
() => props.activeCategory,
|
|
||||||
() => {
|
|
||||||
localSearchQuery.value = "";
|
|
||||||
},
|
|
||||||
);
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user