mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
42 lines
790 B
Vue
42 lines
790 B
Vue
<template>
|
|
<form>
|
|
<A-search-result-team v-if="searchResults?.teams" :teams="searchResults.teams" />
|
|
<A-search-result-tasks v-if="searchResults?.tasks" :subtasks="searchResults.tasks" />
|
|
</form>
|
|
</template>
|
|
|
|
<script>
|
|
import { debounce } from 'lodash-es'
|
|
import ASearchResultTeam from '@/plugins/lib@search/search/_components/a-search-result-team.vue'
|
|
|
|
export default {
|
|
components: {
|
|
ASearchResultTeam
|
|
},
|
|
|
|
data() {
|
|
return {
|
|
searchResults: [],
|
|
search: ''
|
|
}
|
|
},
|
|
|
|
created() {
|
|
try {
|
|
this.searchResults = this.$axios.get_auth_data('v1/search')
|
|
} catch (error) {
|
|
this.$toast.error(error)
|
|
}
|
|
|
|
this.$events.on('onSearch', (search) => {
|
|
this.search = search
|
|
})
|
|
},
|
|
|
|
methods: {
|
|
debounceSearch: debounce(function () {
|
|
this.search()
|
|
}, 300),
|
|
}
|
|
}
|
|
</script> |