serach cards

Signed-off-by: Jakob Röhrl <jakob.roehrl@web.de>
This commit is contained in:
Jakob Röhrl
2020-01-30 11:54:53 +01:00
parent b0e3520969
commit 032573bd69
3 changed files with 26 additions and 2 deletions

View File

@@ -44,6 +44,8 @@ Vue.mixin({
},
})
Vue.prototype.$OC = OC
Vue.directive('tooltip', Tooltip)
Vue.directive('click-outside', ClickOutside)
@@ -58,5 +60,16 @@ new Vue({
el: '#content',
router,
store,
mounted: function() {
this.$OC.Search = new OCA.Search(this.filter, this.cleanSearch)
},
methods: {
filter(query) {
this.$store.commit('setSearchQuery', query)
},
cleanSearch() {
this.$store.commit('setSearchQuery', '')
},
},
render: h => h(App),
})