首页 > 其他 > 详细

vueRouter 子路由嵌套

时间:2019-04-22 17:06:08      阅读:136      评论:0      收藏:0      [点我收藏+]

router.js

 1 import Vue from ‘vue‘
 2 import Router from ‘vue-router‘
 3 import contractPage from ‘./views/contractPage.vue‘
 4 import finish from ‘./views/finish.vue‘
 5 import unfinish from ‘./views/unfinish.vue‘
 6 import Pdf from ‘./views/pdf.vue‘;
 7 Vue.use(Router)
 8 
 9 export default new Router({
10     routes: [
11         {
12             path: ‘/‘,
13             name: ‘contractPage‘,
14             component: contractPage,
15             children:[
16                 {path:‘finish‘,name: ‘finish‘,component:finish},
17                 {path:‘unfinish‘,name: ‘unfinish‘,component:unfinish}
18             ],
19             redirect:‘/unfinish‘
20         },
21         {
22             path: "/pdf",
23             name: ‘pdf‘,
24             component: Pdf
25         }
26     ]
27 })

 

 

页面

技术分享图片

vueRouter 子路由嵌套

原文:https://www.cnblogs.com/zhaozhenzhen/p/10751132.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!