fix(search) : 修复搜索历史错误
- 该错误导致搜索列表不正常展示
This commit is contained in:
@@ -94,8 +94,10 @@ watch(keyword, async () => {
|
||||
// 重置状态
|
||||
loading.value = false
|
||||
|
||||
// 清空 banners
|
||||
// 清空 banners surveys templates
|
||||
banners.value = [];
|
||||
surveys.value = [];
|
||||
templates.value = [];
|
||||
});
|
||||
|
||||
// 索引变动之后,立刻进行搜索 (没有进行防抖)
|
||||
|
||||
@@ -23,6 +23,7 @@ onMounted(() => {
|
||||
onUnmounted(() => {
|
||||
// 当页面取消挂载时,重置搜索框的值
|
||||
searchKeyword.value = '';
|
||||
banners.value = [];
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -80,7 +80,6 @@ function handleTemplateClick(template: any) {
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.template-container {
|
||||
max-height: 30vh;
|
||||
overflow: scroll;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user