🐛 修复搜索bug

This commit is contained in:
目棃
2024-04-04 23:14:09 +08:00
parent 96aec27752
commit 8f322eae45
2 changed files with 20 additions and 14 deletions

View File

@@ -40,6 +40,7 @@ interface ToPostSearchProps {
interface ToPostSearchEmits {
(e: "update:modelValue", value: boolean): void;
(e: "cancel"): void;
}
@@ -94,6 +95,7 @@ watch(
results.value = [];
lastId.value = "";
isLast.value = false;
await searchPosts();
}
},
);
@@ -143,6 +145,9 @@ async function searchPosts() {
lastId.value = res.last_id;
isLast.value = res.is_last;
load.value = false;
if (!visible.value) {
visible.value = true;
}
}
function getGidLabel(): string {