From 89b4e1a76aee9212b05750c57dd4479b1076f1aa Mon Sep 17 00:00:00 2001 From: tugcekucukoglu Date: Mon, 6 May 2024 13:32:30 +0300 Subject: [PATCH] Refactor #5682 - For Dock, Menubar --- components/lib/dock/Dock.d.ts | 15 ++++++++++++-- components/lib/dock/DockSub.vue | 5 +++-- components/lib/menubar/Menubar.d.ts | 32 +++++++++++++++++++++++++---- components/lib/menubar/Menubar.vue | 8 +++++--- 4 files changed, 49 insertions(+), 11 deletions(-) diff --git a/components/lib/dock/Dock.d.ts b/components/lib/dock/Dock.d.ts index 1eda93981..876392579 100644 --- a/components/lib/dock/Dock.d.ts +++ b/components/lib/dock/Dock.d.ts @@ -274,12 +274,23 @@ export interface DockSlots { props: DockRouterBindProps; }): VNode[]; /** + * @deprecated since v4.0. Use 'itemicon' slot. * Custom icon content. - * @param {Object} scope - icon slot's params. + * @param {Object} scope - item icon slot's params. */ icon(scope: { /** - * Custom content for icon. + * Custom content for item icon. + */ + item: MenuItem; + }): VNode[]; + /** + * Custom icon content. + * @param {Object} scope - item icon slot's params. + */ + itemicon(scope: { + /** + * Custom content for item icon. */ item: MenuItem; }): VNode[]; diff --git a/components/lib/dock/DockSub.vue b/components/lib/dock/DockSub.vue index 214b2d825..4c9f827ff 100644 --- a/components/lib/dock/DockSub.vue +++ b/components/lib/dock/DockSub.vue @@ -40,10 +40,11 @@ aria-hidden="true" v-bind="getPTOptions('itemLink', processedItem, index)" > - diff --git a/components/lib/menubar/Menubar.d.ts b/components/lib/menubar/Menubar.d.ts index 68ace7c61..2b5c71a49 100755 --- a/components/lib/menubar/Menubar.d.ts +++ b/components/lib/menubar/Menubar.d.ts @@ -97,7 +97,7 @@ export interface MenubarPassThroughOptions { /** * Used to pass attributes to the mobile menu button icon's DOM element. */ - menubuttonicon?: MenubarPassThroughOptionType; + buttonicon?: MenubarPassThroughOptionType; /** * Used to pass attributes to the submenu's DOM element. */ @@ -318,6 +318,7 @@ export interface MenubarSlots { hasSubmenu: boolean; }): VNode[]; /** + * @deprecated since v4.0. use 'button' slot instead. * Custom menu button template on responsive mode. * @param {Object} scope - menu button slot's params. */ @@ -337,14 +338,37 @@ export interface MenubarSlots { toggleCallback: () => void; }): VNode[]; /** - * Custom popup icon template on responsive mode. - * @deprecated since v3.42.0. Use 'menubuttonicon' slot instead. + * Custom menu button template on responsive mode. + * @param {Object} scope - menu button slot's params. */ - popupicon(): VNode[]; + button(scope: { + /** + * Current id state as a string + */ + id: string; + /** + * Style class of component + */ + class: string; + /** + * + * Toggle event + */ + toggleCallback: () => void; + }): VNode[]; /** + * @deprecated since v4.0. use 'buttonicon' slot instead. * Custom menu button icon template on responsive mode. */ menubuttonicon(): VNode[]; + /** + * Custom submenu icon template. + * @param {Object} scope - submenuicon slot's params. + */ + /** + * Custom menu button icon template on responsive mode. + */ + buttonicon(): VNode[]; /** * Custom submenu icon template. * @param {Object} scope - submenuicon slot's params. diff --git a/components/lib/menubar/Menubar.vue b/components/lib/menubar/Menubar.vue index 45a3040f0..f4f44580f 100755 --- a/components/lib/menubar/Menubar.vue +++ b/components/lib/menubar/Menubar.vue @@ -3,7 +3,8 @@
- + + - - + + +