From be33e737a13c6b6766a1c6bc44d2651989529576 Mon Sep 17 00:00:00 2001 From: tugcekucukoglu Date: Wed, 8 Nov 2023 15:48:47 +0300 Subject: [PATCH] Refactor #4739 - For Menu --- components/lib/menu/BaseMenu.vue | 4 ---- components/lib/menu/Menu.d.ts | 1 + components/lib/menu/Menu.vue | 13 ++----------- components/lib/menu/Menuitem.vue | 14 ++------------ components/lib/menu/style/MenuStyle.js | 8 +------- 5 files changed, 6 insertions(+), 34 deletions(-) diff --git a/components/lib/menu/BaseMenu.vue b/components/lib/menu/BaseMenu.vue index 62767bb8f..a98cdefce 100644 --- a/components/lib/menu/BaseMenu.vue +++ b/components/lib/menu/BaseMenu.vue @@ -26,10 +26,6 @@ export default { type: Number, default: 0 }, - exact: { - type: Boolean, - default: true - }, tabindex: { type: Number, default: 0 diff --git a/components/lib/menu/Menu.d.ts b/components/lib/menu/Menu.d.ts index e8b59aab4..c46aef37b 100755 --- a/components/lib/menu/Menu.d.ts +++ b/components/lib/menu/Menu.d.ts @@ -210,6 +210,7 @@ export interface MenuProps { baseZIndex?: number | undefined; /** * Whether to apply 'router-link-active-exact' class if route exactly matches the item path. + * @deprecated since v3.40.0. * @defaultValue true */ exact?: boolean | undefined; diff --git a/components/lib/menu/Menu.vue b/components/lib/menu/Menu.vue index 0088a0b7b..99728ee91 100644 --- a/components/lib/menu/Menu.vue +++ b/components/lib/menu/Menu.vue @@ -25,12 +25,12 @@ {{ label(item) }}
  • - +
    @@ -73,11 +73,6 @@ export default { resizeListener: null, container: null, list: null, - beforeMount() { - if (!this.$slots.item) { - console.warn('In future versions, vue-router support will be removed. Item templating should be used.'); - } - }, mounted() { this.id = this.id || UniqueComponentId(); @@ -115,10 +110,6 @@ export default { item.command(event); } - if (item.to && event.navigate) { - event.navigate(event.originalEvent); - } - if (this.overlayVisible) this.hide(); if (!this.popup && this.focusedOptionIndex !== event.id) { diff --git a/components/lib/menu/Menuitem.vue b/components/lib/menu/Menuitem.vue index 54f65f44b..dd9c9f66d 100644 --- a/components/lib/menu/Menuitem.vue +++ b/components/lib/menu/Menuitem.vue @@ -13,14 +13,7 @@ >