Skip to content

Commit 05a788d

Browse files
committed
Fix active router-link matching
@see vuejs/vue-router#2040
1 parent 87a0faa commit 05a788d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/Nav.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<nav class="text-center font-semibold text-2xl p-4">
3-
<router-link to="/">
3+
<router-link to="/" :exact="$route.name !== 'calc'">
44
Calc
55
</router-link>
66
|
@@ -15,7 +15,7 @@
1515
</template>
1616

1717
<style>
18-
.router-link-exact-active {
18+
.router-link-active {
1919
@apply text-primary;
2020
}
2121
</style>

0 commit comments

Comments
 (0)