1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
   | import VueRouter from 'vue-router'; import Home from '../components/Home.vue'; import About from '../components/About.vue'; export default new VueRouter({
      mode: 'history',     routes: [         {             path: '/home',             component: Home,             children: [             	                 { path: 'news', component: News,name:'news',                 	children: [                         {                             name: 'detail',                                                          path: 'detail/:id',                             component: Detail,                                                                                                                                                                              props({query:{id,title}}){ return {id,title} }                                                      }                     ]                 },                 { path: 'messages', component: Message }             ]         },         {             path: '/about',             component: About         }     ] });
   |