mirror of
https://github.com/romancm/gamebrary
synced 2024-11-14 23:47:08 +00:00
global search wip
This commit is contained in:
parent
3b52c2b6c5
commit
c13e1c68b1
2 changed files with 36 additions and 0 deletions
|
@ -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: {
|
||||
|
|
32
src/components/GlobalSearch.vue
Normal file
32
src/components/GlobalSearch.vue
Normal 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>
|
Loading…
Reference in a new issue