mirror of
https://codeberg.org/SafeTwitch/safetwitch.git
synced 2024-12-22 13:22:58 -05:00
Fix some errors
This commit is contained in:
parent
dfc36d9222
commit
69128906c4
1 changed files with 17 additions and 1 deletions
|
@ -1,9 +1,25 @@
|
|||
<script lang="ts">
|
||||
export default {
|
||||
setup() {
|
||||
return {
|
||||
searchInput: "",
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
redirectToSearch() {
|
||||
const query = this.searchInput
|
||||
this.$router.push({ path: '/search', query: { query }})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="relative hidden md:block">
|
||||
<label for="searchBar" class="hidden">Search</label>
|
||||
<v-icon name="io-search-outline" class="text-black absolute my-auto inset-y-0 left-2"></v-icon>
|
||||
<input type="text" placeholder="Search"
|
||||
@keyup.enter="this.$router.push('/search?query=' + this.$refs.searchInput.value)"
|
||||
@keyup.enter=redirectToSearch v-model="searchInput"
|
||||
class="rounded-md p-1 pl-8 text-black" ref="searchInput" />
|
||||
</div>
|
||||
</template>
|
Loading…
Reference in a new issue