vue/menu

Extends:

Vue

Mixins:

VueBase.itemsAcc

Arguments:
  • object (config) – The config using the same options as can be provided to sub-MenuItem`s via :js:attr:`items().

An menu item. This class should not be instanciated directly.

Type:Boolean

Whether this item is a header. Default is false. If it is true label and iconClass will be used for its contnet.

divider
Type:Boolean

Whether this item is a divider. Default is false.

disabled
Type:Boolean

Whether this entry should be disabled. Default is false.

label
Type:String

The label of the entry. Must be provided.

iconClass
Type:String (icon class-name)

The class-name for the icon to use (if any). Default is “”.

auxClass
Type:String (class-names)

Auxiliary class names for the menu item for additional styling.

position
Type:Number

Defines the ordering of the entries. They will be sorted in ascending order.

hidden
Type:Boolean

Whether this item is hidden (not shown at all).

callback
Type:Function

This function will be called with this referring to the MenuItem(). If it returns true the menu will be kept open.

items
Type:Object (key => config)

Contains configuration of subitems by key. All the above mentioned attributes can be included in a config.

data
Type:Object

The original data object, this way auxiliary data provided can be accessed.

root
Type:MenuButton

The root instance containing the menu.

Extends:

Vue

Mixins:

VueBase.itemsAcc

Arguments:
  • object (config) – The config of the MenuButton. See attributes for more details.

A MenuButton with a Menu attached.

label
Type:String

The label of the button. Must be provided.

dropup
Type:Boolean

Whether this is a dropup menu. Default false.

iconClass
Type:String (icon class-name)

The class-name of the icon for the button (displayed before the label).

btnClass
Type:String (class-names)

The class-names to be in included. Should be provided.

class
Type:String (class-names)

The class-names for the MenuButton wrapper. May be used to integrate it into a input group.

items
Type:Object (menu definition)

See MenuItem().

Extends:

Vue

Mixins:

VueBase.itemsAcc

Arguments:
  • object (config) – The config of the MenuHeadless. See attributes for more details.

Just a headless menu, which is to be dynamically $attacheTo a menu head, to provide the same menu in multiple locations.

items
Type:Object (menu definition)

See MenuItem().

objClone(obj)

Generates a proper (pseudo-)clone of an object describing a menu.

Arguments:
  • obj (Object) – The object descibing the menu.
Returns:

The cloned menu descibing object

Return type:

Object