diff --git a/api-generator/components/contextmenu.js b/api-generator/components/contextmenu.js
index 4717620b4..85b9f604b 100644
--- a/api-generator/components/contextmenu.js
+++ b/api-generator/components/contextmenu.js
@@ -28,6 +28,12 @@ const ContextMenuProps = [
type: "boolean",
default: "false",
description: "Attaches the menu to document instead of a particular item."
+ },
+ {
+ name: "exact",
+ type: "boolean",
+ default: "true",
+ description: "Whether to apply 'router-link-active-exact' class if route exactly matches the item path."
}
];
diff --git a/src/components/contextmenu/ContextMenu.d.ts b/src/components/contextmenu/ContextMenu.d.ts
index 62effe154..1f3fff4ab 100755
--- a/src/components/contextmenu/ContextMenu.d.ts
+++ b/src/components/contextmenu/ContextMenu.d.ts
@@ -6,6 +6,7 @@ interface ContextMenuProps {
autoZIndex?: boolean;
baseZIndex?: number;
global?: boolean;
+ exact?: boolean;
}
declare class ContextMenu {
diff --git a/src/components/contextmenu/ContextMenu.vue b/src/components/contextmenu/ContextMenu.vue
index d2fa14089..26da5f3a8 100755
--- a/src/components/contextmenu/ContextMenu.vue
+++ b/src/components/contextmenu/ContextMenu.vue
@@ -2,7 +2,7 @@
router-link with route configuration can also be used within templating for further customization.
+
+<ContextMenu :model="items">
+ <template #item="{item}">
+ <router-link :to="item.to" custom v-slot="{href, route, navigate, isActive, isExactActive}">
+ <a :href="href" @click="navigate" :class="{'active-link': isActive, 'active-link-exact": isExactActive}>{{route.fullPath}}</a>
+ </router-link>
+ </template>
+</ContextMenu>
+