mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-06 21:10:38 +00:00
Fix route
This commit is contained in:
parent
b85de3151d
commit
b7052c1df5
@ -4,7 +4,7 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<h1 class="Header__Title">Nuxt i18n</h1>
|
<h1 class="Header__Title">Nuxt i18n</h1>
|
||||||
<nav class="Header__Menu">
|
<nav class="Header__Menu">
|
||||||
<nuxt-link class="Header__Link" :to="path('/')">
|
<nuxt-link class="Header__Link" :to="path('')">
|
||||||
{{ $t('message.home') }}
|
{{ $t('message.home') }}
|
||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
<nuxt-link class="Header__Link" :to="path('/about')">
|
<nuxt-link class="Header__Link" :to="path('/about')">
|
||||||
@ -27,8 +27,7 @@
|
|||||||
export default {
|
export default {
|
||||||
methods: {
|
methods: {
|
||||||
path (url) {
|
path (url) {
|
||||||
console.log(this.$route.params.lang + url)
|
return (this.$route.params.lang ? '/' + this.$route.params.lang + url : url)
|
||||||
return (this.$route.params.lang) ? this.$route.params.lang + url : url
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user