From 35d56075eb33d146c9a7cc8d865280a830e80533 Mon Sep 17 00:00:00 2001
From: 07akioni <07akioni2@gmail.com>
Date: Wed, 16 Dec 2020 11:17:56 +0800
Subject: [PATCH] fix: site vue-router warning

---
 demo/routes/routes.js | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/demo/routes/routes.js b/demo/routes/routes.js
index b56e81c16..0e08cbbc7 100644
--- a/demo/routes/routes.js
+++ b/demo/routes/routes.js
@@ -326,15 +326,17 @@ export const childRoutes = withPrefix('/:lang/:theme/doc', [
 
 export const routes = [
   {
+    name: 'site',
     path: '/:lang/:theme',
     component: () => import('../SiteProvider.vue'),
     children: [
       {
+        name: 'home',
         path: '/:lang/:theme',
-        component: () => import('../documentation/landing/index.vue'),
-        name: 'home'
+        component: () => import('../documentation/landing/index.vue')
       },
       {
+        name: 'doc',
         path: '/:lang/:theme/doc',
         component: () => import('../Documentation.vue'),
         children: childRoutes
@@ -344,6 +346,12 @@ export const routes = [
   {
     name: 'not-found',
     path: '/:pathMatch(.*)*',
-    redirect: '/zh-CN/os-theme'
+    redirect: {
+      name: 'home',
+      params: {
+        lang: 'zh-CN',
+        theme: 'os-theme'
+      }
+    }
   }
 ]