KCommandMenu
示例
Press Ctrl+K to open command menu
A command palette overlay with grouped, searchable items and keyboard navigation. Opens with Cmd/Ctrl+K.
Props
| Name | Type | Default | Description |
|---|---|---|---|
| open | boolean | false | Whether the command menu is visible. |
| groups | KCommandMenuGroup[] | [] | Array of groups, each with a name and items array ({ id, label, action? }). |
| placeholder | string | 'Type a command or search...' | Placeholder text for the search input. |
| theme | 'auto' | 'day' | 'night' | 'auto' | Theme mode. auto follows the current theme; day and night force a specific mode. |
Emits
| Name | Parameters | Description |
|---|---|---|
| update:open | boolean | Emitted when the menu should open or close. |
| select | { id: string; label: string; action?: () => void; groupName: string } | Emitted when an item is selected. |
Slots
| Name | Description |
|---|---|
| — | This component does not provide slots. |