This repository has been archived on 2024-02-08. You can view files and clone it, but cannot push or open issues or pull requests.
2022-05-10 23:31:31 +00:00
|
|
|
import {ref, computed} from 'vue'
|
2022-07-21 16:45:58 +00:00
|
|
|
import {useStore} from '@/store'
|
2022-04-25 17:38:57 +00:00
|
|
|
|
|
|
|
export function useNameSpaceSearch() {
|
|
|
|
const query = ref('')
|
|
|
|
|
|
|
|
const store = useStore()
|
|
|
|
const namespaces = computed(() => store.getters['namespaces/searchNamespace'](query.value))
|
|
|
|
|
|
|
|
function findNamespaces(newQuery: string) {
|
|
|
|
query.value = newQuery
|
|
|
|
}
|
|
|
|
|
|
|
|
return {
|
|
|
|
namespaces,
|
|
|
|
findNamespaces,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|