重定向 redirect: ‘/xxx’ ,嵌套路由children
{
path: '/',
name: 'Index',
component: Index,
children:[ //这里使用了 嵌套路由
{
path: '/',
redirect:'/experience' // 重定向 此时路由 http://localhost:8080/回车重定向 http://localhost:8080/experience
},
{
path: '/experience',
name: 'experience',
component: () => import('../views/experience/experiencePavilion.vue')
},
。。。。
]
},
]
跳转 传值
// 1- router.vue 路由设置
const routes = [
{
path: '/',
redirect:'/home'
},
{
path: '/home',
name: 'home',
component: () => import('../views/home.vue')
},
{
path: '/my',
name: 'my',
componen