global search wip

This commit is contained in:
Gamebrary 2021-04-28 16:39:14 -07:00
parent 3b52c2b6c5
commit c13e1c68b1
2 changed files with 36 additions and 0 deletions

View file

@ -24,6 +24,8 @@
<portal-target name="dock" />
<global-search />
<sidebar />
</nav>
</template>
@ -32,11 +34,13 @@
import { mapState, mapGetters } from 'vuex';
import PinnedBoards from '@/components/Board/PinnedBoards';
import Sidebar from '@/components/Sidebar';
import GlobalSearch from '@/components/GlobalSearch';
export default {
components: {
PinnedBoards,
Sidebar,
GlobalSearch,
},
computed: {

View file

@ -0,0 +1,32 @@
<template lang="html">
<div class="global-search">
<b-form-input
v-model="searchText"
type="search"
debounce="500"
:placeholder="$t('board.addGame.inputPlaceholder')"
@update="search"
/>
</div>
</template>
<script>
export default {
data() {
return {
searchText: '',
};
},
methods: {
search(text) {
console.log(text);
this.$store.dispatch('CUSTOM_SEARCH', text);
},
},
};
</script>
<style lang="scss" rel="stylesheet/scss" scoped>
</style>