Component Reference

Quick reference for the component.


vue-context
view source

Slots

Slot Description
default The default slot also serves as a scoped slot which receives any data passed to the menu

Props

Property Type Default Description
closeOnClick Boolean true If set to false, context menu will not automatically close when clicked on.
closeOnScroll Boolean true If set to true, context menu will automatically close on window scroll.
lazy Boolean false If set to true, context menu will be rendered with a v-if instead of v-show.
itemSelector Array, String ['.v-context-item', '.v-context > li > a'] The selector of the menu items the menu will use to look for to set accessibility attributes and for keyboard navigation.
role String menu Used for the role attribute on the context menu.
tag String ul Used as the root element of the context menu.

Events

Event Arguments Description
close none Emits when the context menu is closed
open
event - The event that triggered the menu to open
data - The custom data sent to the menu
top - The top (y) position of the menu
left - The left (x) position of the menu
Emits when the menu is opened. The event, context menu data, top and left position are all sent through as parameters as well.