vue/menu ================= .. js:class:: MenuItem() :extends: Vue :mixins: VueBase.itemsAcc :param config object: The config using the same options as can be provided to sub-:js:class:`MenuItem`s via :js:attr:`items`. An menu item. This class should not be instanciated directly. .. js:attribute:: header :type: Boolean Whether this item is a header. Default is *false*. If it is *true* :js:attr:`label` and :js:attr:`iconClass` will be used for its contnet. .. js:attribute:: divider :type: Boolean Whether this item is a divider. Default is *false*. .. js:attribute:: disabled :type: Boolean Whether this entry should be disabled. Default is *false*. .. js:attribute:: label :type: String The label of the entry. Must be provided. .. js:attribute:: iconClass :type: String (icon class-name) The class-name for the icon to use (if any). Default is *""*. .. js:attribute:: auxClass :type: String (class-names) Auxiliary class names for the menu item for additional styling. .. js:attribute:: position :type: Number Defines the ordering of the entries. They will be sorted in ascending order. .. js:attribute:: hidden :type: Boolean Whether this item is hidden (not shown at all). .. js:attribute:: callback :type: Function This function will be called with *this* referring to the :js:class:`MenuItem`. If it returns *true* the menu will be kept open. .. js:attribute:: items :type: Object (key => config) Contains configuration of subitems by key. All the above mentioned attributes can be included in a config. .. js:attribute:: data :type: Object The original data object, this way auxiliary data provided can be accessed. .. js:attribute:: root :type: MenuButton The root instance containing the menu. .. js:class:: MenuButton() :extends: Vue :mixins: VueBase.itemsAcc :param config object: The config of the MenuButton. See attributes for more details. A MenuButton with a Menu attached. .. js:attribute:: label :type: String The label of the button. Must be provided. .. js:attribute:: dropup :type: Boolean Whether this is a dropup menu. Default false. .. js:attribute:: iconClass :type: String (icon class-name) The class-name of the icon for the button (displayed before the label). .. js:attribute:: btnClass :type: String (class-names) The class-names to be in included. Should be provided. .. js:attribute:: class :type: String (class-names) The class-names for the MenuButton wrapper. May be used to integrate it into a input group. .. js:attribute:: items :type: Object (menu definition) See :js:class:`MenuItem`. .. js:class:: MenuHeadless() :extends: Vue :mixins: VueBase.itemsAcc :param config object: 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. .. js:attribute:: items :type: Object (menu definition) See :js:class:`MenuItem`. .. js:function:: objClone(obj) Generates a proper (pseudo-)clone of an object describing a menu. :param Object obj: The object descibing the menu. :return: The cloned menu descibing object :rtype: Object