search
search
event is triggered when the user searchs, it gives the current query as a parameter.
html
<template>
<VueQuickActions :items="items" @search="handleSearch" />
</template>
<script setup lang="ts">
import { VueQuickActions, Item } from 'vue-quick-actions';
import "vue-quick-actions/dist/style.css"
const items: Item[] = [
{
key: 'console-write', // Key should be unique
label: "Log 'hey' to console",
onSelect() {
console.log('hey');
}
}
]
const handleSearch = (query: string) => {
console.log('User is searching!', { query })
}
</script>