Skip to content

Commit

Permalink
chore: only generate zh-CN routes
Browse files Browse the repository at this point in the history
See more: #408
  • Loading branch information
qiqingfu committed Nov 24, 2020
1 parent c45f36c commit 3b9fcae
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 31 deletions.
2 changes: 1 addition & 1 deletion examples/components/footer-nav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export default {
computed: {
lang() {
return this.$route.meta.lang
return this.$route.meta.lang || 'zh-CN'
}
},
Expand Down
11 changes: 3 additions & 8 deletions examples/components/header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,9 @@ export default {
verDropdownVisible: true,
langDropdownVisible: true,
langs: {
'zh-CN': '中文',
'en-US': 'English',
es: 'Español',
'fr-FR': 'Français'
}
'zh-CN': '中文'
},
lang: 'zh-CN'
}
},
Expand All @@ -402,9 +400,6 @@ export default {
},
computed: {
lang() {
return this.$route.path.split('/')[1] || 'zh-CN'
},
displayedLang() {
return this.langs[this.lang] || '中文'
},
Expand Down
18 changes: 0 additions & 18 deletions examples/i18n/title.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,5 @@
"guide": "指南 | Element",
"component": "组件 | Element",
"resource": "资源 | Element"
},
"en-US": {
"home": "Element - A Desktop UI Toolkit for Web",
"guide": "Guide | Element",
"component": "Component | Element",
"resource": "Resource | Element"
},
"es": {
"home": "Element - Un kit de interfaz de usuario para la web",
"guide": "Guía | Element",
"component": "Componentes | Element",
"resource": "Recursos | Element"
},
"fr-FR": {
"home": "Element - Un kit de composants d'interface pour le web",
"guide": "Guide | Element",
"component": "Composants | Element",
"resource": "Ressources | Element"
}
}
5 changes: 1 addition & 4 deletions examples/route.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,7 @@ route = route.concat([
path: '/',
redirect: { path: defaultPath }
},
{
path: '',
redirect: { path: defaultPath }
}
{ path: '/:pathMatch(.*)*', redirect: { path: defaultPath } }
])
console.log(route)
export default route

0 comments on commit 3b9fcae

Please sign in to comment.