Fixed #4764 - ContextMenu: hasSubmenu options for item templating
parent
01af58f917
commit
a59b595334
|
@ -290,6 +290,10 @@ export interface ContextMenuSlots {
|
||||||
* Label property of the menuitem
|
* Label property of the menuitem
|
||||||
*/
|
*/
|
||||||
label: string | ((...args: any) => string) | undefined;
|
label: string | ((...args: any) => string) | undefined;
|
||||||
|
/**
|
||||||
|
* Whether or not there is a submenu
|
||||||
|
*/
|
||||||
|
hasSubmenu: boolean;
|
||||||
/**
|
/**
|
||||||
* Binding properties of the menuitem
|
* Binding properties of the menuitem
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
</template>
|
</template>
|
||||||
</a>
|
</a>
|
||||||
</template>
|
</template>
|
||||||
<component v-else :is="templates.item" :item="processedItem.item" :label="getItemLabel(processedItem)" :props="getMenuItemProps(processedItem, index)"></component>
|
<component v-else :is="templates.item" :item="processedItem.item" :hasSubmenu="getItemProp(processedItem, 'items')" :label="getItemLabel(processedItem)" :props="getMenuItemProps(processedItem, index)"></component>
|
||||||
</div>
|
</div>
|
||||||
<ContextMenuSub
|
<ContextMenuSub
|
||||||
v-if="isItemVisible(processedItem) && isItemGroup(processedItem)"
|
v-if="isItemVisible(processedItem) && isItemGroup(processedItem)"
|
||||||
|
|
Loading…
Reference in New Issue