diff --git a/examples/components/footer-nav.vue b/examples/components/footer-nav.vue index 8ce7c0cfc..c2b84b31b 100644 --- a/examples/components/footer-nav.vue +++ b/examples/components/footer-nav.vue @@ -78,7 +78,7 @@ export default { computed: { lang() { - return this.$route.meta.lang + return this.$route.meta.lang || 'zh-CN' } }, diff --git a/examples/components/header.vue b/examples/components/header.vue index 4ecae09d4..17a6570b7 100644 --- a/examples/components/header.vue +++ b/examples/components/header.vue @@ -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' } }, @@ -402,9 +400,6 @@ export default { }, computed: { - lang() { - return this.$route.path.split('/')[1] || 'zh-CN' - }, displayedLang() { return this.langs[this.lang] || '中文' }, diff --git a/examples/i18n/title.json b/examples/i18n/title.json index 1f8b3c34a..912c60abf 100644 --- a/examples/i18n/title.json +++ b/examples/i18n/title.json @@ -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" } } diff --git a/examples/route.config.js b/examples/route.config.js index 0f88ac249..ac1ad2c70 100644 --- a/examples/route.config.js +++ b/examples/route.config.js @@ -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