Refactor #4351
parent
02ee862821
commit
832d7e3dda
|
@ -138,6 +138,14 @@ export interface BreadcrumbSlots {
|
|||
* Menuitem instance
|
||||
*/
|
||||
item: MenuItem;
|
||||
/**
|
||||
* Label property of the menuitem
|
||||
*/
|
||||
label: string | ((...args: any) => string) | undefined;
|
||||
/**
|
||||
* Binding properties of the menuitem
|
||||
*/
|
||||
props: (...args: any) => string;
|
||||
}): VNode[];
|
||||
/**
|
||||
* Custom separator template.
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<span v-if="item.label" :class="cx('label')" v-bind="ptm('label', ptmOptions)">{{ label() }}</span>
|
||||
</a>
|
||||
</template>
|
||||
<component v-else :is="templates.item" :item="item" :label="item.label && label()" :props="getMenuItemProps"></component>
|
||||
<component v-else :is="templates.item" :item="item" :label="label()" :props="getMenuItemProps"></component>
|
||||
</li>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -237,6 +237,14 @@ export interface ContextMenuSlots {
|
|||
* Menuitem instance
|
||||
*/
|
||||
item: MenuItem;
|
||||
/**
|
||||
* Label property of the menuitem
|
||||
*/
|
||||
label: string | ((...args: any) => string) | undefined;
|
||||
/**
|
||||
* Binding properties of the menuitem
|
||||
*/
|
||||
props: (...args: any) => string;
|
||||
}): VNode[];
|
||||
/**
|
||||
* Custom item icon template.
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
</template>
|
||||
</a>
|
||||
</template>
|
||||
<component v-else :is="templates.item" :item="processedItem.item" :label="processedItem.label" :props="getMenuItemProps()"></component>
|
||||
<component v-else :is="templates.item" :item="processedItem.item" :label="getItemLabel(processedItem)" :props="getMenuItemProps(processedItem, index)"></component>
|
||||
</div>
|
||||
<ContextMenuSub
|
||||
v-if="isItemVisible(processedItem) && isItemGroup(processedItem)"
|
||||
|
@ -79,6 +79,7 @@ import BaseComponent from 'primevue/basecomponent';
|
|||
import AngleRightIcon from 'primevue/icons/angleright';
|
||||
import Ripple from 'primevue/ripple';
|
||||
import { DomHandler, ObjectUtils } from 'primevue/utils';
|
||||
import { mergeProps } from 'vue';
|
||||
|
||||
export default {
|
||||
name: 'ContextMenuSub',
|
||||
|
|
|
@ -210,6 +210,14 @@ export interface DockSlots {
|
|||
* Index of the menuitem
|
||||
*/
|
||||
index: number;
|
||||
/**
|
||||
* Label property of the menuitem
|
||||
*/
|
||||
label: string | ((...args: any) => string) | undefined;
|
||||
/**
|
||||
* Binding properties of the menuitem
|
||||
*/
|
||||
props: (...args: any) => string;
|
||||
}): VNode[];
|
||||
/**
|
||||
* Custom icon content.
|
||||
|
|
|
@ -77,6 +77,7 @@ import BaseComponent from 'primevue/basecomponent';
|
|||
import Ripple from 'primevue/ripple';
|
||||
import Tooltip from 'primevue/tooltip';
|
||||
import { DomHandler, ObjectUtils, UniqueComponentId } from 'primevue/utils';
|
||||
import { mergeProps } from 'vue';
|
||||
|
||||
export default {
|
||||
name: 'DockSub',
|
||||
|
|
|
@ -242,6 +242,18 @@ export interface MegaMenuSlots {
|
|||
* Menuitem instance
|
||||
*/
|
||||
item: MenuItem;
|
||||
/**
|
||||
* Label property of the menuitem
|
||||
*/
|
||||
label: string | ((...args: any) => string) | undefined;
|
||||
/**
|
||||
* Binding properties of the menuitem
|
||||
*/
|
||||
props: (...args: any) => string;
|
||||
/**
|
||||
* Whether or not there is a submenu
|
||||
*/
|
||||
hasSubmenu: boolean;
|
||||
}): VNode[];
|
||||
/**
|
||||
* Custom submenu icon template.
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
</template>
|
||||
</a>
|
||||
</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="isItemGroup(processedItem)" :label="getItemLabel(processedItem)" :props="getMenuItemProps(processedItem, index)"></component>
|
||||
</div>
|
||||
<div v-if="isItemVisible(processedItem) && isItemGroup(processedItem)" :class="cx('panel')" v-bind="ptm('panel')">
|
||||
<div :class="cx('grid')" v-bind="ptm('grid')">
|
||||
|
|
|
@ -218,6 +218,14 @@ export interface MenuSlots {
|
|||
* Menuitem instance
|
||||
*/
|
||||
item: MenuItem;
|
||||
/**
|
||||
* Label property of the menuitem
|
||||
*/
|
||||
label: string | ((...args: any) => string) | undefined;
|
||||
/**
|
||||
* Binding properties of the menuitem
|
||||
*/
|
||||
props: (...args: any) => string;
|
||||
}): VNode[];
|
||||
/**
|
||||
* Custom item icon template.
|
||||
|
|
|
@ -233,6 +233,18 @@ export interface MenubarSlots {
|
|||
* Menuitem instance
|
||||
*/
|
||||
item: MenuItem;
|
||||
/**
|
||||
* Label property of the menuitem
|
||||
*/
|
||||
label: string | ((...args: any) => string) | undefined;
|
||||
/**
|
||||
* Binding properties of the menuitem
|
||||
*/
|
||||
props: (...args: any) => string;
|
||||
/**
|
||||
* State of the root
|
||||
*/
|
||||
root: boolean;
|
||||
}): VNode[];
|
||||
/**
|
||||
* Custom popup icon template on responsive mode.
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
</template>
|
||||
</a>
|
||||
</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" :root="root" :label="getItemLabel(processedItem)" :props="getMenuItemProps(processedItem, index)"></component>
|
||||
</div>
|
||||
<MenubarSub
|
||||
v-if="isItemVisible(processedItem) && isItemGroup(processedItem)"
|
||||
|
@ -191,7 +191,7 @@ export default {
|
|||
},
|
||||
this.getPTOptions(processedItem, index, 'action')
|
||||
),
|
||||
icons: mergeProps(
|
||||
icon: mergeProps(
|
||||
{
|
||||
class: [this.cx('icon'), this.getItemProp(processedItem, 'icon')]
|
||||
},
|
||||
|
|
|
@ -238,6 +238,18 @@ export interface PanelMenuSlots {
|
|||
* Menuitem instance
|
||||
*/
|
||||
item: MenuItem;
|
||||
/**
|
||||
* Label property of the menuitem
|
||||
*/
|
||||
label: string | ((...args: any) => string) | undefined;
|
||||
/**
|
||||
* Binding properties of the menuitem
|
||||
*/
|
||||
props: (...args: any) => string;
|
||||
/**
|
||||
* Whether or not there is a submenu
|
||||
*/
|
||||
hasSubmenu: boolean;
|
||||
}): VNode[];
|
||||
/**
|
||||
* Custom submenu icon template.
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
<span :class="cx('label')" v-bind="getPTOptions('label', processedItem, index)">{{ getItemLabel(processedItem) }}</span>
|
||||
</a>
|
||||
</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="isItemGroup(processedItem)" :label="getItemLabel(processedItem)" :props="getMenuItemProps(processedItem, index)"></component>
|
||||
</div>
|
||||
<transition name="p-toggleable-content" v-bind="ptm('transition')">
|
||||
<div v-show="isItemActive(processedItem)" :class="cx('toggleableContent')" v-bind="ptm('toggleableContent')">
|
||||
|
|
|
@ -236,6 +236,18 @@ export interface TieredMenuSlots {
|
|||
* Menuitem instance
|
||||
*/
|
||||
item: MenuItem;
|
||||
/**
|
||||
* Label property of the menuitem
|
||||
*/
|
||||
label: string | ((...args: any) => string) | undefined;
|
||||
/**
|
||||
* Binding properties of the menuitem
|
||||
*/
|
||||
props: (...args: any) => string;
|
||||
/**
|
||||
* Whether or not there is a submenu
|
||||
*/
|
||||
hasSubmenu: boolean;
|
||||
}): VNode[];
|
||||
/**
|
||||
* Custom submenu icon template.
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
</template>
|
||||
</a>
|
||||
</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>
|
||||
<TieredMenuSub
|
||||
v-if="isItemVisible(processedItem) && isItemGroup(processedItem)"
|
||||
|
@ -75,6 +75,7 @@ import BaseComponent from 'primevue/basecomponent';
|
|||
import AngleRightIcon from 'primevue/icons/angleright';
|
||||
import Ripple from 'primevue/ripple';
|
||||
import { ObjectUtils } from 'primevue/utils';
|
||||
import { mergeProps } from 'vue';
|
||||
|
||||
export default {
|
||||
name: 'TieredMenuSub',
|
||||
|
|
Loading…
Reference in New Issue