Rename submenuitem to submenulabel
parent
a2db31aceb
commit
7120cacb9b
|
@ -67,7 +67,7 @@ export interface MenuPassThroughOptions {
|
|||
/**
|
||||
* Used to pass attributes to the submenu item's DOM element.
|
||||
*/
|
||||
submenuItem?: MenuPassThroughOptionType;
|
||||
submenuLabel?: MenuPassThroughOptionType;
|
||||
/**
|
||||
* Used to pass attributes to the item's DOM element.
|
||||
*/
|
||||
|
|
|
@ -21,9 +21,9 @@
|
|||
>
|
||||
<template v-for="(item, i) of model" :key="label(item) + i.toString()">
|
||||
<template v-if="item.items && visible(item) && !item.separator">
|
||||
<li v-if="item.items" :id="id + '_' + i" :class="[cx('submenuItem'), item.class]" role="none" v-bind="ptm('submenuItem')">
|
||||
<!--TODO: submenuheader deprecated since v4.0. Use submenuitem-->
|
||||
<slot :name="$slots.submenuitem ? 'submenuitem' : 'submenuheader'" :item="item">{{ label(item) }}</slot>
|
||||
<li v-if="item.items" :id="id + '_' + i" :class="[cx('submenuLabel'), item.class]" role="none" v-bind="ptm('submenuLabel')">
|
||||
<!--TODO: submenuheader deprecated since v4.0. Use submenulabel-->
|
||||
<slot :name="$slots.submenulabel ? 'submenulabel' : 'submenuheader'" :item="item">{{ label(item) }}</slot>
|
||||
</li>
|
||||
<template v-for="(child, j) of item.items" :key="child.label + i + '_' + j">
|
||||
<PVMenuitem
|
||||
|
|
|
@ -69,7 +69,7 @@ const theme = ({ dt }) => `
|
|||
box-shadow: ${dt('menu.shadow')};
|
||||
}
|
||||
|
||||
.p-menu-submenu-item {
|
||||
.p-menu-submenu-label {
|
||||
background: ${dt('menu.submenu.label.background')};
|
||||
padding: ${dt('menu.submenu.label.padding')};
|
||||
color: ${dt('menu.submenu.label.color')};
|
||||
|
@ -90,7 +90,7 @@ const classes = {
|
|||
],
|
||||
start: 'p-menu-start',
|
||||
list: 'p-menu-list',
|
||||
submenuItem: 'p-menu-submenu-item',
|
||||
submenuLabel: 'p-menu-submenu-label',
|
||||
separator: 'p-menu-separator',
|
||||
end: 'p-menu-end',
|
||||
item: ({ instance }) => [
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<DocSectionText v-bind="$attrs">
|
||||
<p>
|
||||
Menu offers item customization with the <i>item</i> template that receives the menuitem instance from the model as a parameter. The submenu header has its own <i>submenuitem</i> template, additional slots named <i>start</i> and
|
||||
Menu offers item customization with the <i>item</i> template that receives the menuitem instance from the model as a parameter. The submenu label has its own <i>submenulabel</i> template, additional slots named <i>start</i> and
|
||||
<i>end</i> are provided to embed content before or after the menu.
|
||||
</p>
|
||||
</DocSectionText>
|
||||
|
@ -22,7 +22,7 @@
|
|||
<span class="text-xl font-semibold">PRIME<span class="text-primary">APP</span></span>
|
||||
</span>
|
||||
</template>
|
||||
<template #submenuitem="{ item }">
|
||||
<template #submenulabel="{ item }">
|
||||
<span class="text-primary font-bold">{{ item.label }}</span>
|
||||
</template>
|
||||
<template #item="{ item, props }">
|
||||
|
@ -106,7 +106,7 @@ export default {
|
|||
<span class="text-xl font-semibold">PRIME<span class="text-primary">APP</span></span>
|
||||
</span>
|
||||
</template>
|
||||
<template #submenuitem="{ item }">
|
||||
<template #submenulabel="{ item }">
|
||||
<span class="text-primary font-bold">{{ item.label }}</span>
|
||||
</template>
|
||||
<template #item="{ item, props }">
|
||||
|
@ -147,7 +147,7 @@ export default {
|
|||
<span class="text-xl font-semibold">PRIME<span class="text-primary">APP</span></span>
|
||||
</span>
|
||||
</template>
|
||||
<template #submenuitem="{ item }">
|
||||
<template #submenulabel="{ item }">
|
||||
<span class="text-primary font-bold">{{ item.label }}</span>
|
||||
</template>
|
||||
<template #item="{ item, props }">
|
||||
|
@ -242,7 +242,7 @@ export default {
|
|||
<span class="text-xl font-semibold">PRIME<span class="text-primary">APP</span></span>
|
||||
</span>
|
||||
</template>
|
||||
<template #submenuitem="{ item }">
|
||||
<template #submenulabel="{ item }">
|
||||
<span class="text-primary font-bold">{{ item.label }}</span>
|
||||
</template>
|
||||
<template #item="{ item, props }">
|
||||
|
|
Loading…
Reference in New Issue