vue 路由简单配置
程序员文章站
2022-03-25 11:15:41
...
import Vue from 'vue'
import Router from 'vue-router'
// import HomePage from '@/components/homePage'
// import CurrentPage from '@/components/content/currentPage'
// import WalkAllCure from '@/components/content/walkAllcure'
// import AllCureConcepts from '@/components/content/allcureConcepts'
// import DevelopCourse from '@/components/content/developCourse'
// import QualificationHonor from '@/components/content/qualificationHonor'
// import ProductService from '@/components/content/productService'
// import informatizationProducts from '@/components/content/products/informatizationProducts'
// import researchServe from '@/components/content/products/researchServe'
Vue.use(Router)
let router = new Router({
routes: [{
path: '/',
component: resolve => require(['../components/HomePage.vue'], resolve),
children: [{
path: '/',
redirect: '/CurrentPage'
},
{
path: '/CurrentPage',
name: 'CurrentPage',
component: resolve =>require(['../components/content/currentPage.vue'],resolve)
},
{
path: '/WalkAllCure',
name:'WalkAllCure',
component: resolve =>require(['../components/content/WalkAllCure.vue'],resolve)
}, {
path: '/allcureConcepts',
name: 'allcureConcepts',
component: resolve => require(['../components/content/AllCureConcepts.vue'], resolve)
},
{
path: '/developCourse',
name: 'developCourse',
component: resolve => require(['../components/content/developCourse.vue'], resolve)
},
{
path: '/qualificationHonor',
name: 'qualificationHonor',
component:resolve=>require(['../components/content/qualificationHonor.vue'],resolve)
},
{
path: '/productService',
component: resolve => require(['../components/content/products/informatizationProducts.vue'], resolve),
redirect: '/informatizationProducts',
children: [{
path: '/informatizationProducts',
name: 'informatizationProducts',
component: resolve => require(['../components/content/products/informatizationProducts.vue'], resolve)
},
{
path: '/researchServe',
name: 'researchServe',
component: resolve => require(['../components/content/products/researchServe.vue'], resolve)
}
]
},{
path:'/medicalInvest',
name:'medicalInvest',
component: resolve => require(['../components//content/medicalInvest.vue'], resolve)
}
]
},
]
})
export default router
上一篇: 闲鱼啥都卖?60万欠条“挂卖”40万,“烂账”都被谁收去了?
下一篇: vue-router学习