We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 547abec + 7a4b41d commit 8080026Copy full SHA for 8080026
components/nav-item.vue
@@ -3,7 +3,7 @@
3
<component
4
:class="classObject"
5
@click="onclick"
6
- :href="href || to"
+ :href="hrefString"
7
:is="componentType"
8
active-class="active"
9
:to="to"
@@ -28,6 +28,9 @@
28
},
29
componentType() {
30
return this.to ? 'router-link' : 'a';
31
+ },
32
+ hrefString() {
33
+ return typeof this.to === 'object' ? this.href || undefined : this.href || this.to;
34
}
35
36
props: {
0 commit comments