From 0a52948b4cc58608063508d65dff95ee96c9e5c4 Mon Sep 17 00:00:00 2001 From: Cagatay Civici Date: Fri, 14 May 2021 22:04:21 +0300 Subject: [PATCH] Fixed #830 - Improve active route detection in TabMenu --- api-generator/components/tabmenu.js | 6 +++ src/components/tabmenu/TabMenu.d.ts | 1 + src/components/tabmenu/TabMenu.vue | 61 +++++++++++++++-------------- src/views/tabmenu/TabMenuDoc.vue | 6 +++ 4 files changed, 44 insertions(+), 30 deletions(-) diff --git a/api-generator/components/tabmenu.js b/api-generator/components/tabmenu.js index 8179ca484..25e1b4a74 100644 --- a/api-generator/components/tabmenu.js +++ b/api-generator/components/tabmenu.js @@ -4,6 +4,12 @@ const TabMenuProps = [ type: "array", default: "null", description: "An array of menuitems." + }, + { + name: "exact", + type: "boolean", + default: true, + description: "Defines if active route highlight should match the exact route path." } ]; diff --git a/src/components/tabmenu/TabMenu.d.ts b/src/components/tabmenu/TabMenu.d.ts index 04f23f862..d99a9ad27 100755 --- a/src/components/tabmenu/TabMenu.d.ts +++ b/src/components/tabmenu/TabMenu.d.ts @@ -1,5 +1,6 @@ interface TabMenuProps { model?: any[]; + exact?: boolean; } declare class TabMenu { diff --git a/src/components/tabmenu/TabMenu.vue b/src/components/tabmenu/TabMenu.vue index 93a3ff979..7255fa714 100755 --- a/src/components/tabmenu/TabMenu.vue +++ b/src/components/tabmenu/TabMenu.vue @@ -2,14 +2,16 @@