feat: search bar

This commit is contained in:
CorentinTh 2020-05-15 12:27:18 +02:00
parent 34889eb1ce
commit 49f0721107
No known key found for this signature in database
GPG key ID: 44C26D9F091CEFC7
4 changed files with 75 additions and 11 deletions

View file

@ -0,0 +1,44 @@
<template>
<v-autocomplete
label="Search..."
single-line
append-icon="fa-search"
color="white"
hide-details
:items="items"
item-text="component.name"
item-value="path"
solo-inverted
@change="choose"
>
<template v-slot:no-data>
<v-list-item>
<v-list-item-title>
Search for the <strong>tool</strong> you need!
</v-list-item-title>
</v-list-item>
</template>
</v-autocomplete>
</template>
<script>
import {toolsRoutes} from '../router'
export default {
name: "SearchBar",
data(){
const vm = this;
return {
items:toolsRoutes,
choose(path){
vm.$router.push(path)
}
}
},
}
</script>
<style scoped>
</style>