From 832d7e3dda2af18f6c63d074374616530139e9af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Wed, 30 Aug 2023 16:28:00 +0300 Subject: [PATCH] Refactor #4351 --- components/lib/breadcrumb/Breadcrumb.d.ts | 8 ++++++++ components/lib/breadcrumb/BreadcrumbItem.vue | 2 +- components/lib/contextmenu/ContextMenu.d.ts | 8 ++++++++ components/lib/contextmenu/ContextMenuSub.vue | 3 ++- components/lib/dock/Dock.d.ts | 8 ++++++++ components/lib/dock/DockSub.vue | 1 + components/lib/megamenu/MegaMenu.d.ts | 12 ++++++++++++ components/lib/megamenu/MegaMenuSub.vue | 2 +- components/lib/menu/Menu.d.ts | 8 ++++++++ components/lib/menubar/Menubar.d.ts | 12 ++++++++++++ components/lib/menubar/MenubarSub.vue | 4 ++-- components/lib/panelmenu/PanelMenu.d.ts | 12 ++++++++++++ components/lib/panelmenu/PanelMenuSub.vue | 2 +- components/lib/tieredmenu/TieredMenu.d.ts | 12 ++++++++++++ components/lib/tieredmenu/TieredMenuSub.vue | 3 ++- 15 files changed, 90 insertions(+), 7 deletions(-) diff --git a/components/lib/breadcrumb/Breadcrumb.d.ts b/components/lib/breadcrumb/Breadcrumb.d.ts index d93a6c6b5..ea6db8c49 100755 --- a/components/lib/breadcrumb/Breadcrumb.d.ts +++ b/components/lib/breadcrumb/Breadcrumb.d.ts @@ -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. diff --git a/components/lib/breadcrumb/BreadcrumbItem.vue b/components/lib/breadcrumb/BreadcrumbItem.vue index e62e1f19e..82d02312c 100755 --- a/components/lib/breadcrumb/BreadcrumbItem.vue +++ b/components/lib/breadcrumb/BreadcrumbItem.vue @@ -14,7 +14,7 @@ {{ label() }} - + diff --git a/components/lib/contextmenu/ContextMenu.d.ts b/components/lib/contextmenu/ContextMenu.d.ts index a85b4f92f..abc6840f6 100755 --- a/components/lib/contextmenu/ContextMenu.d.ts +++ b/components/lib/contextmenu/ContextMenu.d.ts @@ -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. diff --git a/components/lib/contextmenu/ContextMenuSub.vue b/components/lib/contextmenu/ContextMenuSub.vue index 3a7e01598..a62a8dbde 100755 --- a/components/lib/contextmenu/ContextMenuSub.vue +++ b/components/lib/contextmenu/ContextMenuSub.vue @@ -39,7 +39,7 @@ - + string) | undefined; + /** + * Binding properties of the menuitem + */ + props: (...args: any) => string; }): VNode[]; /** * Custom icon content. diff --git a/components/lib/dock/DockSub.vue b/components/lib/dock/DockSub.vue index 6e3f3ae92..e0b38ee11 100644 --- a/components/lib/dock/DockSub.vue +++ b/components/lib/dock/DockSub.vue @@ -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', diff --git a/components/lib/megamenu/MegaMenu.d.ts b/components/lib/megamenu/MegaMenu.d.ts index 02a0f951b..bb945707b 100755 --- a/components/lib/megamenu/MegaMenu.d.ts +++ b/components/lib/megamenu/MegaMenu.d.ts @@ -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. diff --git a/components/lib/megamenu/MegaMenuSub.vue b/components/lib/megamenu/MegaMenuSub.vue index 05fb56b18..54b0fc0f3 100644 --- a/components/lib/megamenu/MegaMenuSub.vue +++ b/components/lib/megamenu/MegaMenuSub.vue @@ -39,7 +39,7 @@ - +
diff --git a/components/lib/menu/Menu.d.ts b/components/lib/menu/Menu.d.ts index 4b15a86c1..b13531941 100755 --- a/components/lib/menu/Menu.d.ts +++ b/components/lib/menu/Menu.d.ts @@ -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. diff --git a/components/lib/menubar/Menubar.d.ts b/components/lib/menubar/Menubar.d.ts index 94d81cd9f..061c4f7dd 100755 --- a/components/lib/menubar/Menubar.d.ts +++ b/components/lib/menubar/Menubar.d.ts @@ -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. diff --git a/components/lib/menubar/MenubarSub.vue b/components/lib/menubar/MenubarSub.vue index 220fd1482..292e1738b 100755 --- a/components/lib/menubar/MenubarSub.vue +++ b/components/lib/menubar/MenubarSub.vue @@ -38,7 +38,7 @@ - +
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. diff --git a/components/lib/panelmenu/PanelMenuSub.vue b/components/lib/panelmenu/PanelMenuSub.vue index 057ece7c4..7c389f532 100755 --- a/components/lib/panelmenu/PanelMenuSub.vue +++ b/components/lib/panelmenu/PanelMenuSub.vue @@ -35,7 +35,7 @@ {{ getItemLabel(processedItem) }} - +
diff --git a/components/lib/tieredmenu/TieredMenu.d.ts b/components/lib/tieredmenu/TieredMenu.d.ts index acb402bdf..2881e0a3f 100755 --- a/components/lib/tieredmenu/TieredMenu.d.ts +++ b/components/lib/tieredmenu/TieredMenu.d.ts @@ -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. diff --git a/components/lib/tieredmenu/TieredMenuSub.vue b/components/lib/tieredmenu/TieredMenuSub.vue index ae08ecbb9..106d08d1b 100755 --- a/components/lib/tieredmenu/TieredMenuSub.vue +++ b/components/lib/tieredmenu/TieredMenuSub.vue @@ -38,7 +38,7 @@ - +