mirror of
https://github.com/0PandaDEV/Qopy.git
synced 2025-04-21 13:14:04 +02:00
refactor: serach function now async which is way faster
This commit is contained in:
parent
ae878b7203
commit
f435a7b20a
14 changed files with 203 additions and 106 deletions
|
@ -3,7 +3,7 @@
|
|||
<input
|
||||
ref="searchInput"
|
||||
v-model="searchQuery"
|
||||
@input="onSearch"
|
||||
@input="onInputChange"
|
||||
class="search"
|
||||
autocorrect="off"
|
||||
autocapitalize="off"
|
||||
|
@ -21,10 +21,12 @@ const searchInput = ref<HTMLInputElement | null>(null);
|
|||
|
||||
const emit = defineEmits<{
|
||||
(e: "search", query: string): void;
|
||||
(e: "searchStarted"): void;
|
||||
(e: "focus"): void;
|
||||
}>();
|
||||
|
||||
const onSearch = () => {
|
||||
const onInputChange = () => {
|
||||
emit("searchStarted");
|
||||
emit("search", searchQuery.value);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue