CardMenu

This component allows you to create a card menu.

Example

CardMenu

<card-menu
    :title="$t('cardTitle')"
    card-title-class="is-size-5"
    icon="account-multiple"
    custom-class="splitter-card"
    :locale="$i18n.locale"
    :items="items"
    :data-url="getBasePath"
    :item-fields-for-label="['names', 'lastNames']"
    :show-context-menu="true"
    context-menu-id="elements-context-menu"
    :is-loading="isLoading"
    :ctx-menu-options="[
      {
        icon: 'account-box-outline',
        id: 'add',
        name: $t('add', { element: $tc('emissor') })
      }
    ]"
    :ctx-menu-item-options="[
      {
        icon: 'account-box-outline',
        id: 'add',
        name: $t('add', { element: $tc('emissor') })
      },
      {
        icon: 'account-edit-outline',
        id: 'edit',
        name: $t('edit', { element: $tc('emissor') })
      },
      {
        icon: 'account-remove-outline',
        id: 'delete',
        name: $t('delete', { element: $tc('emissor') })
      }
    ]"
    :allow-drag="isDraggEnabled || dragEnabled"
    :before-render-items="loadItemIcon"
    @ctxOptionClicked="optionClicked"
    @itemSelected="itemSelected"
    @dragStart="transmitterDragged"
  >
  </card-menu>

Props

NameDescriptionTypeRequiredDefault
titleThe card titleStringfalse""
cardSubtitleThe card subtitleStringfalsenull
cardTitleClassThe card title classStringfalse"is-size-4"
cardSubtitleClassThe card subtitle classStringfalse"is-size-5"
iconThe icon to show in the cardStringfalse""
customClassThe custom class to use in the cardStringfalse""
menuCustomClassThe custom class to use in the menuStringfalse"master-details-selection-container"
beforeRenderItemsAllows you to perform an action with loaded items before render them. Ex: items = beforeRenderItems(loadedItems)Functionfalseundefined
itemsThe items that the component use to construct the list to show in the menuArrayfalse
itemFieldsForLabelThe fields name for construct the label of every itemArraytrue
showPaginationAllows you to show or not the paginationBooleanfalsetrue
dataUrlA url to charge dataStringfalseundefined
paginationSizeSame as size in Buefy b-paginationStringfalse"is-default"
paginationIsSimpleSame as simple in Buefy b-paginationBooleanfalsetrue
paginationIsRoundedSame as rounded in Buefy b-paginationBooleanfalsefalse
paginationPerPageCount of elements by pageNumberfalse5
paginationPrevIconSame as icon-prev in Buefy b-paginationStringfalseundefined
paginationNextIconSame as icon-next in Buefy b-paginationStringfalseundefined
itemsPerPageOptionsList of counts used to change de count of elements showed in the tableArrayfalse2,5,10,25,50,100
showContextMenuAllows you to show or not the contex menuBooleanfalsefalse
contextMenuIdAllows you to indicate the contex menu idStringfalseundefined
ctxMenuOptionsList of options to show in the context menuArrayfalse
ctxMenuItemOptionsList of options to show in the context menuArrayfalse
localeLocale string {en, es ...} for display language on componentStringfalse"en"
isLoadingDisable the menu items and enable a b-loading to let you know the component is chargingBooleanfalsefalse
allowDragSame as draggable in Buefy b-menu-itemBooleanfalsefalse
dropEffectEffect to apply on dragStringfalse"copy"

Events

Event NameDescriptionParameters
itemSelected--
ctxOptionClicked--
dragStart--
dragEnd--