fix search

This commit is contained in:
vapormusic 2022-09-09 22:35:36 +07:00
parent 74e1e3d38a
commit 1d8b39aa01
4 changed files with 4 additions and 4 deletions

View file

@ -280,7 +280,7 @@
<input type="search" spellcheck="false" @click="$root.appRoute('search');search.showHints = true"
@focus="search.showHints = true"
@blur="setTimeout(()=>{if(hintscontext != true){search.showHints = false} }, 300)"
v-on:keyup.enter="searchQuery(search.hints[search.cursor].content ?? search.hints[search.cursor].searchTerm);search.showHints = false;search.cursor = -1" @change="$root.appRoute('search');"
v-on:keyup.enter="searchQuery(search.hints[search.cursor]?.content ?? search.hints[search.cursor]?.searchTerm ?? search.term);search.showHints = false;search.cursor = -1" @change="$root.appRoute('search');"
v-on:keyup="searchCursor"
@input="getSearchHints()"
:placeholder="$root.getLz('term.search') + '...'" v-model="search.term" ref="searchInput"

View file

@ -10,7 +10,7 @@
@click="$root.appRoute('search');$root.search.showHints = true"
@focus="$root.search.showHints = true"
@blur="$root.setTimeout(()=>{if($root.hintscontext != true){$root.search.showHints = false} }, 300)"
v-on:keyup.enter="$root.searchQuery($root.search.hints[$root.search.cursor].content ?? $root.search.hints[$root.search.cursor].searchTerm);$root.search.showHints = false;$root.search.cursor = -1"
v-on:keyup.enter="$root.searchQuery($root.search.hints[$root.search.cursor]?.content ?? $root.search.hints[$root.search.cursor]?.searchTerm ?? $root.search.term);$root.search.showHints = false;$root.search.cursor = -1"
v-on:keyup="$root.searchCursor"
@change="$root.appRoute('search');"
@input="$root.getSearchHints()"

View file

@ -4,7 +4,7 @@
<div class="search-input--icon"></div>
<input type="search" spellcheck="false" @focus="$root.search.showHints = true"
@blur="$root.setTimeout(()=>{if($root.hintscontext != true){$root.search.showHints = false} }, 300)"
v-on:keyup.enter="$root.searchQuery($root.search.hints[$root.search.cursor].content ?? $root.search.hints[$root.search.cursor].searchTerm);$root.search.showHints = false" @input="$root.getSearchHints()"
v-on:keyup.enter="$root.searchQuery($root.search.hints[$root.search.cursor]?.content ?? $root.search.hints[$root.search.cursor]?.searchTerm ?? $root.search.term);$root.search.showHints = false" @input="$root.getSearchHints()"
:placeholder="$root.getLz('term.search') + '...'" v-model="$root.search.term"
class="search-input" />