0
Fork 0
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:
dragongoose 2023-04-16 15:48:20 -04:00
parent dfc36d9222
commit 69128906c4

View file

@ -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>