fix(search) : 修复搜索历史错误

- 该错误导致搜索列表不正常展示
This commit is contained in:
Huangzhe
2025-05-21 17:20:35 +08:00
parent 9d7c961fb1
commit ecd4f3e8d8
3 changed files with 4 additions and 2 deletions

View File

@@ -94,8 +94,10 @@ watch(keyword, async () => {
// 重置状态
loading.value = false
// 清空 banners
// 清空 banners surveys templates
banners.value = [];
surveys.value = [];
templates.value = [];
});
// 索引变动之后,立刻进行搜索 (没有进行防抖)

View File

@@ -23,6 +23,7 @@ onMounted(() => {
onUnmounted(() => {
// 当页面取消挂载时,重置搜索框的值
searchKeyword.value = '';
banners.value = [];
});
</script>

View File

@@ -80,7 +80,6 @@ function handleTemplateClick(template: any) {
<style lang="scss" scoped>
.template-container {
max-height: 30vh;
overflow: scroll;
}
</style>